tedwardd

Yearly High/Low Indicator

This is a basic line drawing script which will draw lines for the highest and lowest prices for each year on a chart. High lines will be green and low lines will be red. Each line is labeled with the year and price that it represents. It takes in a single input value which is the year to start marking from. By default, the script will only draw the yearly high lines and a check-box can be selected to enable the low lines. The high line can, similarly, be disable should you only want the low lines. I chose this default because I noticed that more often than not, with both enabled, the screen got a little too cluttered.

Known Issues:
If you set the starting year to the current year, the labels don't show up. I spent a while trying to figure out why but I gave up after realizing that if you only have one year selected, it's less important that they be labeled and it didn't bother me after that. If it bothers you, fix it and feel free to let me know how you did it but I'm not interested in working any harder on a fix right now.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?