The cycles are determined using the as follows:
if is overbought, cycle switches to until falls below 40 , at which point it becomes neutral
if is oversold, cycle switches until rises above 60, at which point it becomes neutral
a neutral cycle is exited at either overbought or oversold conditions
Very useful, please give it a try and let me know what you think
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.