Stochastic RSI: formula, 14/14/3/3 settings, and what it adds to RSI
Stochastic RSI is the stochastic formula applied to RSI values instead of prices. It reaches 0 and 100 faster and more often than RSI, so it adds speed and extra signals, not new information about price. Each extra signal is a trade that pays costs, so only a side-by-side test after costs can say whether the speed is worth it.
By Soren Huang · Published · updated · Editorial policy
Contents
- What is Stochastic RSI and does it add anything over RSI?
- How is Stochastic RSI calculated, step by step?
- What do the 14/14/3/3 settings mean and which should you change?
- Why does StochRSI give faster signals and more noise?
- How does Stochastic RSI compare with RSI and the stochastic (KD)?
- How do you test Stochastic RSI against RSI and stochastic rules?
- Frequently asked questions
- References
What is Stochastic RSI and does it add anything over RSI?
Stochastic RSI is the stochastic formula applied to RSI values instead of prices. It swings from 0 to 100 faster and more often than RSI, so it signals earlier and more often, but it adds no new information about price. It adds speed and extra signals, and every extra signal is a trade that pays commission and slippage.
Two indicators sit inside it. RSI (relative strength index) is an indicator that measures the balance of up closes and down closes over a set number of bars and reports it on a 0-to-100 scale. The stochastic oscillator is an indicator that measures where the latest value sits between the highest and lowest value of the last N bars, also on a 0-to-100 scale. Stochastic RSI (often written StochRSI) feeds the RSI line into the stochastic formula in place of price. So price feeds RSI, and RSI feeds StochRSI. It is an indicator built on another indicator.
A camera comparison helps. RSI is a photo of the whole landscape. StochRSI zooms in on the last 14 bars of that photo and stretches whatever it finds there to fill the frame. A small bump in RSI becomes a full climb from the bottom of the frame to the top. The zoom shows the same scene faster and larger, but it does not add anything that was not already in the picture. Where StochRSI sits among the many oscillators and trend tools is covered in the guide to which technical analysis tools and indicators you can test.
How is Stochastic RSI calculated, step by step?
The calculation runs in two layers: first a 14-bar RSI from price, then that RSI placed between its own highest and lowest value of the last 14 bars, then two short averages that smooth the result into %K and %D. The order matters, because each step takes the previous step's output as its input.
- Compute RSI from closing prices. With the default length of 14, RSI compares the average gain and the average loss of the last 14 bars and scales the result from 0 to 100. The RSI page has the full definition.
- Find the highest and lowest RSI value of the last 14 bars. This is the "range" the stochastic formula uses. Note that it is a range of RSI values, not a range of prices.
- Place today's RSI inside that range. This gives the raw StochRSI, a number between 0 and 100 (some platforms show it between 0 and 1).
- Smooth the raw value with a 3-bar average. The result is %K, the main line. %K is the smoothed StochRSI line that triggers most rules.
- Smooth %K with another 3-bar average. The result is %D, the signal line. %D is the slower line that %K is compared against for crossing rules.
The one formula worth remembering is the third step:
StochRSI = (RSI − lowest RSI) ÷ (highest RSI − lowest RSI) × 100
Here RSI is today's RSI value, lowest RSI is the smallest RSI value in the last 14 bars, and highest RSI is the largest RSI value in the same 14 bars. When today's RSI is the highest of the window, StochRSI reads 100. When it is the lowest, it reads 0.
Hypothetical example
Suppose today's 14-bar RSI is 58. Over the last 14 bars the lowest RSI was 46 and the highest was 62. Raw StochRSI = (58 − 46) ÷ (62 − 46) × 100 = 12 ÷ 16 × 100 = 75. RSI at 58 is well below the usual 70 overbought level, yet StochRSI at 75 is close to its usual 80 level. If RSI rises to 62 tomorrow and the window's highest value is still 62, StochRSI reads 100.
What do the 14/14/3/3 settings mean and which should you change?
The four default numbers are the RSI length, the stochastic lookback on RSI, the %K smoothing and the %D smoothing, and the first two control how often the indicator reaches its extremes far more than the last two do. If you want fewer signals, lengthen a lookback. If you want the same signals a little later and a little cleaner, lengthen a smoothing value.
| Setting | Default | What it controls | What raising it does |
|---|---|---|---|
| RSI length | 14 | How many bars of up and down closes RSI balances | RSI wanders less, so its 14-bar range is narrower and StochRSI reaches 0 or 100 less often |
| Stochastic lookback | 14 | How many RSI values set the highest and lowest | The range widens, so today's RSI is less often at an edge; fewest extreme readings per bar |
| %K smoothing | 3 | Bars averaged to make the main line | Removes one-bar spikes; signals arrive a few bars later; count barely changes |
| %D smoothing | 3 | Bars averaged to make the signal line | %K and %D cross less often and later; useful only for crossing rules |
A common mistake is to fight noise with smoothing alone. Raising %K from 3 to 5 or 7 delays each signal by a few bars but removes few of them, because the underlying raw line still visits 0 and 100 just as often. Raising the two lookbacks from 14 to 21 or 28 removes signals, because a longer window of RSI is more likely to hold a value above today's and a value below it. Platforms sometimes list the four settings in a different order, so check which number is the RSI length and which is the stochastic lookback before you copy a setting from one chart to another.
Why does StochRSI give faster signals and more noise?
StochRSI is faster and noisier because the stochastic layer rescales RSI to its own recent range, so a small wander of RSI becomes a full swing of StochRSI. If RSI moves between 45 and 60 over two weeks, the lowest value is 45 and the highest is 60, and every reading in between is stretched across 0 to 100. RSI at 60 is a quiet, neutral reading. StochRSI at 100 looks like a strong overbought signal. The two numbers describe the same bar.
Think of a thermometer that resets its scale every two weeks to the coldest and warmest day it has seen. In a mild spell, a slightly warm afternoon shows as the top of the scale. That is StochRSI in a quiet market: RSI never approaches 70 or 30, but StochRSI touches 80 and 20 again and again. The indicator is not wrong. It is answering a different question, "where is RSI relative to its own last 14 bars?", and in a quiet market the answer flips often.
Each of those flips is a signal, and for a systematic rule each signal is a trade. A trade pays commission on entry and exit plus slippage, the difference between the price the backtest assumed and the price you would actually get. If StochRSI produces three times as many crossings as RSI on the same bars, a StochRSI rule pays roughly three times the costs for the same stretch of history. The trading costs in backtests article shows how quickly many small trades turn a positive gross result into a negative net one. This is the central trade-off of the indicator: more signals arrive earlier, and each one has to earn more than it costs.
On the illustrative stretch in the figure, RSI is at an extreme for a few bars and StochRSI for about a quarter of the bars. Real markets differ, so count the signals on your own data before deciding how to set the lookbacks.
How does Stochastic RSI compare with RSI and the stochastic (KD)?
RSI measures the balance of up and down closes, the stochastic (KD) measures where price sits in its recent high-low range, and StochRSI measures where RSI sits in its recent range, so the three share one purpose but differ in input, speed, trigger levels and signal count. They all try to say "this move has gone far enough for now" on a 0-to-100 scale. An indicator like MACD belongs to a different family: it measures the distance between two moving averages and has no fixed scale, as explained in the MACD indicator explained article.
| Feature | RSI | Stochastic (KD) | Stochastic RSI |
|---|---|---|---|
| Input | Closing prices | Price high-low range and close | RSI values |
| Formula layers | 1 | 1 | 2 |
| Default setting | 14 | 14/3/3 | 14/14/3/3 |
| Common trigger levels | 30 and 70 | 20 and 80 | 20 and 80 |
| Speed | Slow | Medium | Fast |
| Signals on the same bars | Fewest | More | Most |
| Typical weakness | Stays mid-range during long trends | Whipsaws in sideways ranges | Whipsaws in almost every condition |
The weaknesses are mirror images. RSI is slow, so in a long trend it can sit between 55 and 65 for months and never produce a signal; the RSI indicator guide to the 70/30 levels covers how to test rules around that problem. KD is faster because the price range of 14 bars changes quickly, and the KD indicator (Stochastic) formula and meaning article shows where its whipsaws come from. StochRSI is the fastest of the three, and its whipsaws appear in trends and ranges alike, because RSI always has a recent high and low, no matter how calm price is.
None of the three is "the right one". Which speed suits a strategy depends on how the rule exits, how much each trade costs and how the market behaves at the bar size you trade. That is a question for a test, not a chart.
How do you test Stochastic RSI against RSI and stochastic rules?
Run the three indicators as separate rule families on the same market, bar size, costs and next-bar execution, and compare average trade after costs and trade count on data the search did not see. Everything except the indicator stays equal. If the exit, the costs or the data differ between families, you are testing those differences, not the indicators.
- Pick one market and one bar size. For example ES futures on daily bars, or Mini-TAIEX on 15-minute bars. Keep it fixed for all three families.
- Write one entry and one exit rule per family with the same exit logic. For instance: enter long when the line crosses up out of its oversold level, exit when it crosses down out of its overbought level, and the reverse for shorts. Use 30/70 for RSI and 20/80 for KD and StochRSI, or test the level as a parameter.
- Set the same commission, slippage and next-bar execution for all three. Next-bar execution means a signal read at the close of one bar fills at the open of the next bar, which is the earliest price you could have traded.
- Run each family over the same parameter ranges. Lookbacks from 7 to 28, smoothing from 1 to 5, levels in steps of 5. The number of variants tried matters later.
- Read the out-of-sample part only. Out-of-sample data is the later part of the history that the search never used to choose settings. Compare average trade after costs and trade count there.
- Keep only families whose average trade is several times the round-trip cost. A family that needs cheap fills to stay positive will not survive a worse month of slippage.
Two things decide whether this test is honest. First, costs must be charged inside every candidate, not added at the end, because StochRSI's higher trade count is exactly what costs punish. When the three families run through AlphaPrime (Valynox) backtesting, the same commission, slippage and next-bar fills are applied to every RSI, KD and StochRSI variant, so the penalty for extra trades is already in the ranking you read. Second, the best result out of hundreds of variants carries a bonus from the choice itself. Bailey, Borwein, López de Prado and Zhu (2014) show that the more variants you try, the more the best in-sample result is inflated, and Harvey and Liu (2015) propose discounting a result for the number of tests behind it. Reading the out-of-sample part is the practical answer to that problem.
What follows is a real AlphaPrime run on ES, shown so you can see what such a report looks like. It tested a VWAP rule as a stand-in, not a Stochastic RSI rule, so it says nothing about how StochRSI performs. The run used ES daily bars from 2019-01-02 to 2025-06-30, long and short, one contract, with $20 commission and $25 slippage charged per trade, and the only entry and exit was a VWAP rule with no stop, target or filter. The candidate shown is the one the search kept out of more than a thousand tried (the box gives the exact count), chosen for its return against its drawdown. Picking the kept candidate after the fact flatters it, in the same way the best of many StochRSI settings would be flattered.
Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $109,660 |
| Max drawdown | $56,977.5 |
| Trades | 67 |
| Win rate | 65.67% |
| Profit factor | 1.769 |
| Average trade | $1,636.72 |
| Time in market | 91.62% |
Read it the way you would read your own three-family test. The trade count is 67 over about six and a half years, so each trade carries a lot of weight and a few trades changing would move the average. The average trade of $1,636.72 sits far above the $45 of commission and slippage charged per trade, which is the cost check from step six. Time in market of 91.62% tells you the rule is almost always holding a position, which is a feature of a daily-bar rule with no stop or filter. A StochRSI family on the same bars would typically show a much higher trade count and a smaller average trade, and that is the comparison the test is for. None of these numbers is a forecast, and the fact that this candidate was kept out of many means its figures look better than a fresh run would.

A concrete next step: load one market and bar size you trade, write the same cross-out-of-extreme rule for RSI, KD and StochRSI, charge your real commission plus at least one tick of slippage per side, and count the trades each family produces on the last two years of data before you look at profit. The trade count alone will tell you how much more each StochRSI signal has to earn.
Frequently asked questions
What are the best Stochastic RSI settings?
There is no single best setting; 14/14/3/3 is the default and is where most tests start. Lengthening the two lookbacks (for example to 21/21) cuts the number of extreme readings, while lengthening the smoothing values mainly delays signals by a few bars. Test a range of settings on your own market and bar size, read the result on data the search did not use, and look for a broad region of settings that behave alike rather than one lucky value.
Is Stochastic RSI better than RSI?
It is faster, not more informed. StochRSI is computed from RSI, so it contains no information about price that RSI does not already hold; it rescales RSI to its last 14 bars, which makes it reach its extremes sooner and more often. Whether that speed is worth the extra trades depends on costs and on the market, which is why the two should be run side by side with the same exit rule and the same commission and slippage.
What do 20 and 80 mean on Stochastic RSI?
They are the common oversold and overbought levels. A reading above 80 means RSI is near the top of its own range over the last 14 bars; below 20 means it is near the bottom. Because the range is RSI's own recent range, StochRSI can read 80 or 20 while RSI itself is still in neutral territory between 40 and 60.
Why does Stochastic RSI stay at 100 or 0 for several bars?
StochRSI reads 100 whenever today's RSI is the highest value in the lookback window, and 0 whenever it is the lowest. In a steady trend, RSI makes a new 14-bar high or low on bar after bar, so the raw StochRSI pins to an edge. The %K smoothing softens this slightly, but a strong trend will still hold the line near the edge for as long as RSI keeps making new window highs or lows.
Can I use Stochastic RSI for a futures strategy?
Yes, as a rule family in a test, the same way you would test RSI or KD. The main thing to check is the trade count after costs, because StochRSI produces more crossings than RSI on the same bars and each crossing is a trade that pays commission and slippage. Use next-bar execution, charge realistic costs inside the test, and judge the average trade on out-of-sample data.
References
- Wilder, J. W. (1978). New Concepts in Technical Trading Systems. Trend Research.
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.

