PROTECTED SOURCE SCRIPT
Updated

Draw Horizontal Lines

2 775
This script will draw horizontal lines at user-specified levels on a trading chart, which is especially useful for marking key support and resistance levels.

Explanation:

Indicator Definition: The indicator function sets up the script with the name "Draw Horizontal Lines" and specifies that it should overlay the price chart.

Processing Levels: The space-separated string of levels is split into an array using str.split.

Release Notes
Changed space separated input to comma separated input.
Release Notes
Typo fix

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.