This variation uses a instead of an exponetial.
Since a is used by this variation, a longer length tends to give better results compared to a shorter length.
- Step1: Calculating the Gains and Losses within the chosen period.
- Step2: Calculating the simple moving averages of gains and losses.
- Step3: Calculating Cutler’s ( RS ). Calculated using the following:
- -> Cutler’s RS = (gains,length) / (losses,length)
- Step 4: Calculating the Cutler’s ( ). Calculated used the following:
- -> = 100 — [100/(1 + RS )]
I have added some signals and filtering options with moving averages:
- Trend OB/OS: Uptrend after above Overbought Level. Downtrend after below Oversold Level.
- OB/OS: When above Overbought, or below oversold
- 50-Cross: Above 50 line is uptrend, below is downtrend
- Direction: Moving up or down
- RSI vs MA: above MA is an uptrend, below MA is a downtrend
The signals I added are just some potential ideas, always backtest your own strategies.
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.