indicator · own pane · open source
Stochastic RSI indicator
Stochastic RSI is a free open-source indicator by @deepwick. Stochastic RSI applies the Stochastic kernel to RSI itself, so it sits between 0 and 1 (or… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Stochastic RSI does
Stochastic RSI applies the Stochastic kernel to RSI itself, so it sits between 0 and 1 (or 0-100 scaled). Far more sensitive than a regular Stochastic.
- Useful for short-term reversals on majors and BTCUSD.
- %K crossing %D in the lower band is a clean entry trigger.
- Raise
RSI Lengthto slow it down.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Stochastic RSI", overlay=false)
len = input.int(14, "RSI Length", minval=2, maxval=100)
klen = input.int(3, "%K Smoothing", minval=1, maxval=50)
dlen = input.int(3, "%D Smoothing", minval=1, maxval=50)
src = input.source(close, "Source")
colorLine = input.color("color.blue", "Color Line")
colorMid = input.color("color.orange", "Color Mid")
colorNeutral = input.color("color.gray", "Color Neutral")
rsi1 = ta.rsi(src, len)
lo = ta.lowest(rsi1, len)
hi = ta.highest(rsi1, len)
srsi = 100 * (rsi1 - lo) / (hi - lo)
k = ta.sma(srsi, klen)
d = ta.sma(k, dlen)
hline(80, "Overbought", color=colorNeutral, linestyle=hline.style_dashed)
hline(20, "Oversold", color=colorNeutral, linestyle=hline.style_dashed)
p_Stoch_RSI = plot(k, "Stoch RSI", color=colorLine, linewidth=2)
p_Signal = plot(d, "Signal", color=colorMid)
alertcondition(ta.crossover(k, d) and k < 20, "StochRSI cross up in OS", "Stoch RSI crossed signal in oversold")
alertcondition(ta.crossunder(k, d) and k > 80, "StochRSI cross down in OB", "Stoch RSI crossed signal in overbought")
No comments yet.
Sign in to comment.