indicator · own pane · open source

Adaptive Stochastic RSI indicator

Adaptive Stochastic RSI is a free open-source indicator. Adaptive Stochastic RSI — feeds an adaptive-length RSI into a stochastic formula, then… Deepwick Script runs a subset of Pine Script.

v1Updated 3 Oct 2026▲ 0 users
Running…
Loading chart…

What Adaptive Stochastic RSI does

Adaptive Stochastic RSI — feeds an adaptive-length RSI into a stochastic formula, then smooths with a 3-bar SMA. Combines Kaufman's adaptation with Connors' StochRSI.

  • 20/80 extremes work the same; the signals are cleaner.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
indicator("Adaptive Stochastic RSI", overlay=false)
len = input.int(14, "Base length", minval=5, maxval=100)
colorLine = input.color("color.blue", "Color  Line")
colorNeutral = input.color("color.gray", "Color  Neutral")
cumAbs = ta.cum(math.abs(ta.change(close)))
sumAbs = cumAbs - cumAbs[len]
er = math.abs(close - close[len]) / math.max(sumAbs, 0.0001)
aLen = na(er) ? 14 : math.max(5, math.min(200, math.round(len * (1 - er / 2))))
rsi = ta.rsi(close, aLen)
srsi = 100 * (rsi - ta.lowest(rsi, aLen)) / math.max(ta.highest(rsi, aLen) - ta.lowest(rsi, aLen), 0.0001)
stochRsi = ta.sma(srsi, 3)
hline(80, "OB", color=colorNeutral)
hline(20, "OS", color=colorNeutral)
p_StochRSI = plot(stochRsi, "StochRSI", color=colorLine, linewidth=2)
alertcondition(ta.crossover(stochRsi, 20), "Up from OS", "Adaptive stoch RSI crossed above 20")
alertcondition(ta.crossunder(stochRsi, 80), "Down from OB", "Adaptive stoch RSI crossed below 80")

Comments

No comments yet.

Sign in to comment.