StochRSI
How far the RSI sits inside its own recent range, from 0 at its low to 1 at its high.
StochRSI runs the stochastic formula on an RSI line instead of on price. The RSI here is the summed up-moves minus the summed down-moves, divided by their total, over the last rsi_window bars, so it runs from -1 to +1 and is not drawn. The output places that RSI between its lowest and highest reading of the last stoch_window bars: 0 at the bottom of that range, 1 at the top. If volume is connected, each one-minute move is weighted by the log of its volume plus one before it is summed.
How to read it
- The line sits in its own pane below the price, always between 0 and 1.
- 0 means the RSI is at the lowest of its last 14 readings (the default stoch_window), 1 at the highest, and 0.5 is the middle of that range.
- A run along 0 or 1 means the RSI keeps setting new lows or highs; a turn away from an end means it has stopped doing so.
- The 0.8 and 0.2 lines mark positions in the recent range, not the classic RSI 70 and 30 levels, because the RSI itself is not drawn.
What it outputs
- StochRSI
- Where the current RSI sits between its lowest and highest reading of the last stoch_window bars, from 0 to 1. On defaults it is at 0 or 1 on at least 5 percent of bars each, with a median near 0.52.
Settings
- rsi_window
- How many bars the RSI looks back over. The default 1500 is slow, so the RSI changes gradually bar to bar and the line follows its broad trend. Lowering it toward 14 makes the RSI react within minutes, and the line then swings between 0 and 1 far more often.
- stoch_window
- How many RSI readings the 0-to-1 range is taken over. Raising it widens the range, so the line reaches 0 or 1 less often and moves more gently. Lowering it toward 3 makes the line flip between the ends on small RSI changes.
Pitfalls
- Not the textbook indicator on defaults: the 1500-bar RSI makes this a slow gauge, not the classic 14-period StochRSI. Set rsi_window to 14 for the textbook version.
- The first 1,500 bars of history have no value while the RSI warms up, so the line starts late when little history is loaded.
- A flat RSI across the whole stoch_window leaves a gap instead of a value. In the one-month SPY sample the only gaps were the warmup.