indicator · own pane · open source
Ehlers Smoothed RSI
Running…
Loading chart…
About
Ehlers Smoothed RSI — feeds the differenced close (with a 4-bar smoothing kernel) into RSI. Strips out the slow trend before measuring relative strength, so the RSI hugs the cycle.
- Cleaner than classic RSI on trending assets.
- 70/30 still work as extreme zones.
Source code
//@version=5
indicator("Ehlers Smoothed RSI", overlay=false)
len = input.int(14, "RSI length", minval=2, maxval=100)
src = close - close[1]
smooth = (src + 2 * src[1] + 2 * src[2] + src[3]) / 6
rsi = ta.rsi(smooth, len)
hline(70, "OB", color=color.gray)
hline(30, "OS", color=color.gray)
p_Smoothed_RSI = plot(rsi, "Smoothed RSI", color=color.purple, linewidth=2)
alertcondition(ta.crossover(rsi, 70), "Overbought", "Smoothed RSI crossed above 70")
alertcondition(ta.crossunder(rsi, 30), "Oversold", "Smoothed RSI crossed below 30")
No comments yet.
Sign in to comment.