OPEN-SOURCE SCRIPT
Updated Rolling HH with Future Projection

Highest High line of last X bars
Plus a deferred line which shifts the first one by factor Y
Plus a deferred line which shifts the first one by factor Y
Release Notes
What the indicator doesDraws two lines.
The 1st HHline shows the Highest High line of last X bars. Plus a prolongation for the next X bars.
This prolongaton pretends that there will be no more higher highs in the future. What off course will often, but not always be the case.
2nd line is a deferred line which shifts the first one by factor Y
How is it working
Collecting the HHs of the last X bars, storing them in an arryay.
Use-case
Trade setup 'return to the mean'. Factor < 1.0, so derived line is below HHline. When derived line is thouched/crossed, then there is a correction by factor Y below the HH of the last X bars.
In case the derived line isn't hit yet, how much time and space is left to accomplish that? The prolongation gives an estimation.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
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.