bairam1000

Slope Indicator of Highest Highs and Lowest Lows


In this example, the indicator calculates the slope between the highest high value of the current period and the highest high value candles bars ago. The result is plotted on the chart as a line.
And this example calculates the slope between the lowest low value of the current period and the lowest low value candles bars ago. It then plots the slope on the chart using a red line.

Feel free to adjust the input parameters and modify the code to fit your specific requirements. If you have any more questions or need further assistance, feel free to ask!
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?