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.
For example : For 1H TF : i_iterations = 100 * 24 * 20 (Converting 1M to 1H timeframe ) and i _start = 500 * 24 * 20
output := array.get(M, bar_index)"
I tried to comply with this command and blocked the na value at low timeframes.
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!