I want to draw resistance and support lines by hand, import them to pine script, and calculate the distance(percentage) of the current value of the price and the drawn line(support or resistance).
I couldn't find the solution on the internet. Anyone helps?
Thanks in advance
This is not possible in pinescript
. User drawn objects are not accessible.
As a workaround, you can have a user input where you can enter your support/resistance level manually.