OPEN-SOURCE SCRIPT
Updated

Programmatic Horizontal Levels (price:text)

79
Trading view does not support drawing multiple horizontal lines programmatically.
This indicator accepts line coordinates in the format given below.

line1_price:line1_label,line2_price:line2_label

comma separated price:label
Example:
I want to add 5 lines with some labels.

1418.3:R1,1384.9:R2,1377.1:R3,1372.2:R4,1510.2:R5
Release Notes
Generate the f_levels_for_symbol() function programmatically for your use case and paste it in the script.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.