How it works
Stochastic RSI is an indicator of an indicator. It applies the stochastic calculation — position within a lookback range — not to price but to the RSI series. The motivation is a genuine complaint about RSI: on many instruments RSI spends most of its life between 40 and 60 and only rarely visits the classic thresholds, so a trader waiting for 70 or 30 waits a very long time. Rescaling RSI against its own recent high and low makes it use the whole 0-100 scale again.
What you get is a much more sensitive instrument that answers a subtly different question. RSI asks how strong momentum is in absolute terms. StochRSI asks whether momentum is currently at the top or the bottom of the range it has occupied lately. A StochRSI of 100 does not mean the market is powerfully overbought; it means RSI is at the highest value it has reached in the stochastic window, which might be an RSI of 78 in a raging trend or an RSI of 54 in a sleepy range.
That distinction is the whole trade-off. The double normalisation makes StochRSI a fast, frequently-triggering oscillator suited to timing entries inside a bias that has already been established elsewhere. It is a poor standalone tool, because two layers of transformation put it a long way from price and it will hit 0 and 100 many times in a stretch where price does very little. Practitioners generally use it as a trigger inside a filter: decide the direction from structure or a trend indicator, then use StochRSI's exit from an extreme zone to time entry.
Because it is so quick to saturate, the useful event is usually not the extreme itself but the departure from it. A cross back below 80, or back above 20, after a period pinned there marks the moment when momentum stopped making new local extremes. That framing keeps you out of the worst failure mode, which is shorting a market that pinned at 100 three days ago and has been climbing ever since.
Among its neighbours it sits between the plain Stochastic — which normalises price position and reacts to range structure — and Connors RSI, which mixes a short RSI with streak and percentile components to achieve a similar sensitivity by different means. All three are attempts to make a bounded oscillator informative in the middle of its range.
Calculation
The arithmetic in words, in the order it happens.
First compute RSI on the close over the RSI length, conventionally 14. Then apply the stochastic formula to that RSI series: raw StochRSI = (current RSI - lowest RSI over the stochastic length) / (highest RSI over the stochastic length - lowest RSI over that length), where the stochastic length is also conventionally 14. The result runs from 0 to 1 and is usually multiplied by 100. It is then smoothed twice: %K is a 3-period simple moving average of the raw value, and %D is a 3-period simple moving average of %K. When RSI has been perfectly flat over the window the denominator is zero and the value is carried forward.
Source
An AlgoBeamScript implementation of the formula above, written by us from the arithmetic so the code and the calculation agree line for line.
Runs unchanged on the platform and in the AlgoBeamTS runtime. The language reference is in the documentation.
Inputs
Defaults are the values most charting packages ship with. They are conventions, not optimal settings — the right length depends on your instrument and your holding period.
| Input | Default | What it changes |
|---|---|---|
| RSI Length | 14 | The lookback of the underlying RSI. This controls how smooth the input series is; shortening it to 5 or 7 makes the whole indicator far more erratic, since a noisy input is then rescaled against its own noise. |
| Stochastic Length | 14 | How many bars of RSI history the current RSI is ranked against. Shorter windows guarantee frequent trips to 0 and 100; longer windows restore some of the absolute-level information that the transformation throws away. |
| %K Smoothing | 3 | Simple moving average on the raw stochastic value. Below 3 the line is close to unusable on most instruments; above 5 you have re-introduced most of the sluggishness the indicator was designed to remove. |
| %D Smoothing | 3 | Signal line length. Wider settings mean fewer crossovers and later ones — the same trade every smoothing parameter makes. |
How to read it
What practitioners take from the plot. Read these as descriptions of market state, not as entry signals.
- Crossing back down through 80
- RSI has stopped making new local highs. The most usable bearish trigger the indicator produces, and far safer than selling the first touch of 100.
- Crossing back up through 20
- RSI has stopped making new local lows. Used as a timing trigger for longs when direction is already established by something slower.
- Pinned at 100 for several bars
- RSI is setting a new high every bar — a momentum expansion, not an overbought warning. Countertrend signals should be suspended here.
- Oscillating rapidly across the whole scale
- RSI itself is going nowhere and the transformation is amplifying noise. The indicator is telling you the market is directionless, and should be ignored rather than traded.
- %K/%D crossover inside an extreme zone
- The conventional entry refinement: the crossover confirms the turn in local momentum while the zone confirms that it happened at an edge rather than mid-range.
Limitations
Where this indicator misleads. None of these are fixed by a better parameter.
- Two normalisations put it far from price. It can trace a full cycle from 0 to 100 and back while price barely moves, which is a false picture of activity.
- It saturates even more readily than RSI, so in a trending market it will sit at an extreme for long runs and generate a stream of losing countertrend triggers.
- Signal density is high enough that costs matter. On intraday charts with default settings it produces many crossings per session, most of which are noise.
- It inherits every weakness of the underlying RSI — the lag from Wilder smoothing, the unreliability of divergence — and adds sensitivity on top.
Educational reference. This page explains how an indicator is built and how it is commonly read. It is not investment advice, not a recommendation and not a signal service. No indicator is profitable on its own — each is a way of describing a market, and any rule built on one has to be tested with realistic costs before it is traded.