◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Indicators / Stochastic RSI
Momentum indicator

Stochastic RSI

An oscillator that applies the stochastic formula to RSI values instead of price, producing a faster but noisier 0-100 (or 0-1) momentum reading.

Illustrative diagram — not live market data.

What it is

Stochastic RSI (StochRSI) is an indicator of an indicator. Developed by Tushar Chande and Stanley Kroll and published in 1994, it takes the familiar RSI calculation and then runs the stochastic oscillator formula on the RSI values themselves, rather than on price. The result measures where the current RSI sits relative to its own recent range: a reading near the top means RSI is at the high end of its recent range, and a reading near the bottom means RSI is at the low end. The stated motivation was that plain RSI can spend long stretches between 30 and 70 without reaching its classic extremes; StochRSI re-scales RSI so it reaches its own extremes far more often. That makes it more reactive, but 'faster' is not the same as 'better' — the double transformation also amplifies noise, and StochRSI frequently pins at 0 or 100 for several bars at a time. Like every oscillator, it is descriptive: it summarizes recent momentum behaviour and predicts nothing. This is educational material only, not financial advice, and all trading carries risk of loss.

How it works

The calculation is a two-step transformation. Step one: compute a standard RSI over a chosen lookback (commonly 14 bars), which produces a 0-100 momentum series based on Wilder-smoothed average gains and losses. Step two: apply the stochastic formula to that RSI series over a second lookback (also commonly 14): StochRSI = (RSI − lowest RSI over N bars) / (highest RSI over N bars − lowest RSI over N bars). The raw output runs from 0 to 1, though many platforms scale it to 0-100. Most implementations then smooth the raw value with a short moving average to produce a %K line, and smooth %K again to produce a %D signal line (3 and 3 are typical). The double transformation explains the indicator's signature behaviour: because the stochastic step measures RSI against its own recent range, any time RSI makes a new N-bar high or low — which happens often — StochRSI hits exactly 1 or 0 and stays pinned there while the streak continues. That pinning is a mechanical consequence of the formula, not an unusually strong signal. It also means StochRSI readings depend on two lookback windows plus two smoothing lengths, so small settings changes can noticeably reshape the line.

How traders read it

Common settings

Typical defaults are RSI length 14, stochastic length 14, %K smoothing 3, and %D smoothing 3, applied to the close. Some traders shorten both lookbacks for an even faster line or lengthen them to calm the pinning behaviour. Because there are four interacting parameters, StochRSI is more settings-sensitive than plain RSI — the same chart can look very different under modest parameter changes, so treat any preferred settings as a choice to understand, not a discovered truth.

Strengths

Pitfalls to watch

Pine v6 example

//@version=6
indicator("Stochastic RSI Example", overlay = false)

rsiLen   = input.int(14, "RSI Length", minval = 1)
stochLen = input.int(14, "Stochastic Length", minval = 1)
kSmooth  = input.int(3, "%K Smoothing", minval = 1)
dSmooth  = input.int(3, "%D Smoothing", minval = 1)
src      = input.source(close, "Source")

rsiValue = ta.rsi(src, rsiLen)
rawStoch = ta.stoch(rsiValue, rsiValue, rsiValue, stochLen)
k = ta.sma(rawStoch, kSmooth)
d = ta.sma(k, dSmooth)

plot(k, "%K", color = color.blue)
plot(d, "%D", color = color.orange)
hline(80, "Upper", color = color.gray)
hline(20, "Lower", color = color.gray)

Pro tip: When comparing StochRSI to plain RSI, put both in separate panes on the same chart and watch how often each reaches its extremes: StochRSI will hit 0 or 100 many times for every RSI visit to 30/70, purely because of the re-scaling step. That exercise makes the trade-off concrete — more readings means more noise, not more information. Treat pinned extremes as a description of a streak in RSI, not a countdown to reversal, and pair any reading with price structure and defined risk. Educational context only; no indicator is predictive, and trading involves risk of loss.

Built an indicator from this? Run it through the Validator to catch look-ahead bias and repainting, or convert a strategy to Pine Script.

Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro