momentum indicator
Stochastic RSI backtesting — Stochastic RSI
Stochastic RSI (StochRSI) applies the Stochastic Oscillator’s range formula to RSI values instead of price, producing a faster, more sensitive oscillator. It amplifies RSI’s overbought/oversold signal at the cost of more noise — a trade-off that only shows up clearly once you run the numbers on real candles.
How Stochastic RSI works
RSI is calculated first, over its own lookback window. Then the Stochastic formula is applied to that RSI series — measuring where the current RSI value sits within its own recent high-low range — producing the raw %K. %K is optionally smoothed, and %D is a moving average of %K, mirroring the standard Stochastic Oscillator’s structure. Because it is a stochastic of an already-bounded oscillator, StochRSI moves faster and hits its 0/100 extremes far more often than plain RSI. CandleTest’s implementation follows TradingView-parity conventions throughout. Readings near 100 or 0, and %K/%D crosses, are both testable as no-code rules.
Stochastic RSI settings
The lookback window for the underlying RSI calculation. Shorter lengths make the base RSI — and everything built on it — more reactive.
The lookback window the Stochastic formula uses on the RSI series. Shorter windows make StochRSI hit extremes more often.
Smoothing applied to the raw %K line. Higher values reduce whipsaw at the cost of extra lag.
The moving-average window used to derive %D from %K. Longer values make %D a slower signal line for %K to cross.
Example Stochastic RSI strategies to backtest
Enter long when %K crosses above 20 (leaving deep oversold). Exit when %K crosses above 80.
Enter long when %K crosses above %D. Exit when %K crosses back below %D.
Every rule above is buildable in the no-code strategy builder — pick conditions, press run, and get win rate, drawdown and equity curve on real exchange data with fees and leverage modeled.
Stochastic RSI FAQ
How is Stochastic RSI different from regular RSI?
Regular RSI measures momentum directly from price gains and losses; StochRSI takes that RSI value and re-measures it against its own recent range, which amplifies swings and produces a much faster, choppier line. Backtesting the same style of rule on both shows how much more often StochRSI fires and whether the extra signals are worth the extra noise.
Why does StochRSI hit 0 and 100 so often?
Because it is a Stochastic calculation applied to an already-bounded series, small moves in RSI can push StochRSI to its extremes quickly. That sensitivity is the whole point of the indicator, but it also means extreme readings alone are a weaker filter than they look — worth checking against a plain backtest.
Is StochRSI good for scalping crypto?
Its speed makes it popular for short timeframes, but speed also means more false signals in choppy conditions. Whether it holds up depends entirely on the pair, timeframe, and exit rule — test it directly rather than assuming its reputation transfers to your setup.
Should I use %K/%D crosses or the extreme levels?
Both are common; crosses fire earlier and more often, while extreme-level rules wait for a more stretched reading. Running both as separate backtests on the same market is the fastest way to see which produces a better result for your exit logic.