how to read drawn lines by user using pinescript in tradingview

395 views Asked by At

Has anyone a solution how you can work with the price of a horizontal line object which was drawn manually on the chart?

I tried to get lines from the user but that's not a professional work...

1

There are 1 answers

0
Emad On

As far as I know, you can use the confirm argument in input.time() and input.float() for getting the X and Y. If it's a horizontal line then you only need the float one.

confirm (const bool) If true, the interactive input mode is enabled and the selection is done by clicking on the chart when the indicator is added to the chart, or by selecting the indicator and moving the selection after that. Optional. The default is false.