This guide works through the RSI formula on a model Nifty series, then covers overbought and oversold readings, how RSI behaves in trends, the 50 line, divergences and failure swings, the settings traders use on daily and intraday charts, and where the indicator misleads.
RSI measures the speed of a move, not its end. On the model series below, RSI(14) first closed above 70 on day 29, and Nifty rose another 214 points over three sessions before it turned. In a rising market RSI tends to swing between about 40 and 80, and in a falling market between about 20 and 60, so a change of range often says more than a single reading.
A short history of RSI
J. Welles Wilder Jr., a mechanical engineer turned commodity trader, published the Relative Strength Index in 1978 in *New Concepts in Technical Trading Systems*, the same book that introduced the Average True Range, the Parabolic SAR and the Directional Movement System behind ADX.1 He built it for hand calculation: a 14-period setting, a smoothing method that needs only the previous average and the latest change, and levels of 70 and 30 that marked stretched moves in the commodity markets he traded.
Later writers changed how RSI is read more than how it is calculated. In 1994 Tushar Chande and Stanley Kroll applied the stochastic formula to RSI itself to make StochRSI, a faster version that reaches its extremes more often.2 In 1999 Constance Brown described the range shift: RSI holding between about 40 and 80 in uptrends and 20 and 60 in downtrends, which turned the overbought and oversold levels into trend clues rather than fixed signals.3 In 2009 Larry Connors and Cesar Alvarez popularised very short settings such as RSI(2) for buying pullbacks in stocks above their 200-day average.4
In India, RSI arrived on traders' screens with the online charting tools of the 2000s and became one of the most watched indicators on Nifty and Bank Nifty charts. Since 1 April 2026, algos offered to retail traders run through brokers under SEBI's retail algo framework, and an RSI rule is one of the simplest conditions to write into one.5
The model Nifty series
Every number on this page comes from one model series of 72 daily closes. It is a seeded random walk, not market data, built to include a slow rise, a rally, a sharp fall and a recovery.
| Phase | Sessions | Close at the start | Close at the end |
|---|---|---|---|
| Dip and slow rise | Days 1 to 25 | 24,800.00 | 24,920.15 |
| Rally to the high | Days 26 to 32 | 24,959.45 | 25,500.00 |
| Fall to the low | Days 33 to 44 | 25,473.00 | 24,158.55 |
| Recovery | Days 45 to 72 | 24,181.20 | 25,867.60 |
The fall from 25,500.00 to 24,158.55 is 1,341.45 points, or 5.26%. The recovery to day 72 adds 1,709.05 points, or 7.07%. The guides to moving averages and MACD use the same closes, so the three indicators can be compared session by session.
RSI formula and calculation
The calculation takes five steps.
- Work out each period's change. The change is today's close minus yesterday's close.
- Split the changes into gains and losses. A rise counts as a gain and as zero loss; a fall counts as a loss, recorded as a positive number, and as zero gain. An unchanged close counts as zero for both.
- Average the first 14. The first average gain is the sum of 14 gains divided by 14, and the same for losses. This needs 15 closes.
- Smooth every later value. From the 15th change on, Wilder's smoothing keeps thirteen-fourteenths of the old average and adds one-fourteenth of the new value.
- Turn the ratio into RSI. Divide the average gain by the average loss to get RS, then apply the formula.
The first RSI value, step by step
The first 15 closes of the model series give 14 changes: six gains and eight losses.
| Day | Close | Change | Gain | Loss |
|---|---|---|---|---|
| 1 | 24,800.00 | |||
| 2 | 24,756.00 | −44.00 | 0 | 44.00 |
| 3 | 24,763.25 | +7.25 | 7.25 | 0 |
| 4 | 24,735.45 | −27.80 | 0 | 27.80 |
| 5 | 24,721.80 | −13.65 | 0 | 13.65 |
| 6 | 24,622.60 | −99.20 | 0 | 99.20 |
| 7 | 24,516.90 | −105.70 | 0 | 105.70 |
| 8 | 24,451.45 | −65.45 | 0 | 65.45 |
| 9 | 24,545.05 | +93.60 | 93.60 | 0 |
| 10 | 24,671.30 | +126.25 | 126.25 | 0 |
| 11 | 24,619.65 | −51.65 | 0 | 51.65 |
| 12 | 24,683.35 | +63.70 | 63.70 | 0 |
| 13 | 24,635.45 | −47.90 | 0 | 47.90 |
| 14 | 24,668.30 | +32.85 | 32.85 | 0 |
| 15 | 24,732.15 | +63.85 | 63.85 | 0 |
| Total | 387.50 | 455.35 |
The average gain is 387.50 ÷ 14 = 27.68 points and the average loss 455.35 ÷ 14 = 32.53 points. RS = 27.68 ÷ 32.53 = 0.851, so RSI = 100 − 100 ÷ 1.851 = 45.97. Losses were a little larger than gains over the fortnight, and the reading sits just below 50.
Why one large move changes RSI so much
Each new change carries a weight of one-fourteenth, about 7.1%, and the old average keeps the other 92.9%. On day 17 a single gain of 138.35 points, five times the average gain, moved RSI from 47.49 to 55.69. Old changes are never dropped, only shrunk, so the effect of that day fades gradually instead of disappearing 14 sessions later.
Wilder's smoothing is an exponential average with a weight of 1 ÷ N on the newest value. That is slower than the usual exponential moving average of the same length, whose weight is 2 ÷ (N + 1): a 14-period Wilder average reacts like a 27-period EMA. After about 100 periods, the starting values carry less than 0.1% of the weight, which is why a calculation needs a long history before its readings settle.
Why two charts can show different RSI values
| Cause | Effect |
|---|---|
| Smoothing method | Some tools use simple 14-period averages, known as Cutler's RSI, instead of Wilder's smoothing |
| Start of the data | Wilder's averages carry every past change with a shrinking weight, so a calculation that starts later gives different numbers for a while |
| Data feed | Different closing prices, adjusted futures data or a missing session change every later value |
| Closing price | The official daily close and the last price on an intraday chart can differ |
On the model series the differences are large. On day 44, the low, Wilder's RSI reads 24.35 and the simple-average version 10.14. On day 60 they read 62.53 and 86.26. Starting Wilder's calculation on day 20 instead of day 1 gives 39.91 instead of 34.11 on day 40, and the two are still 0.77 apart on day 72, at 81.80 and 81.03. Most charting platforms use Wilder's method. When you compare a backtest with a chart, check which method each uses and load at least 100 periods of history before the first signal.
How to read the RSI scale
| Reading | Usual interpretation |
|---|---|
| Above 80 | A very fast rise; rare on RSI(14) of an index |
| 70 to 80 | Overbought: gains have far outweighed losses |
| 50 to 70 | Gains larger than losses: buyers in control |
| 30 to 50 | Losses larger than gains: sellers in control |
| 20 to 30 | Oversold: losses have far outweighed gains |
| Below 20 | A very fast fall; rare on RSI(14) of an index |
The scale is not linear in RS. An RSI of 70 means average gains are 2.33 times average losses; 80 means 4 times; 90 means 9 times. Moving from 50 to 70 needs RS to rise from 1 to 2.33, while moving from 70 to 90 needs it to nearly quadruple again. That is why RSI(14) on an index rarely goes above 85 or below 15, and why the last few points near either end take the most force.
Overbought and oversold levels
Wilder set the levels at 70 and 30. Overbought means the period's gains have been much larger than its losses; oversold means the reverse. Neither says the move is over. On the model series:
| Event | Day | Close | RSI(14) |
|---|---|---|---|
| First close above 70 | 29 | 25,285.60 | 72.30 |
| Highest RSI, at the price high | 32 | 25,500.00 | 78.00 |
| Back below 70 | 35 | 25,285.10 | 61.10 |
| First close below 30 | 43 | 24,289.10 | 26.81 |
| Lowest RSI, at the price low | 44 | 24,158.55 | 24.35 |
| Back above 30 | 46 | 24,319.60 | 33.06 |
| Above 70 again, in the recovery | 68 | 25,441.60 | 71.52 |
| Last session | 72 | 25,867.60 | 81.03 |
Three things stand out. The first overbought close on day 29 came 214.40 points below the high. The first oversold close on day 43 came one session and 130.55 points before the low. And in the recovery, RSI stayed above 70 for the last five sessions while Nifty rose another 426 points, from 25,441.60 to 25,867.60. Taken as signals on their own, the levels were early at the top, close at the bottom and wrong in the recovery.
Levels for different markets and settings
The 70 and 30 levels suit RSI(14) on daily charts of broad indices. Common adjustments:
- 80 and 20 for strongly trending or volatile stocks, and for shorter settings, so that the levels still mark unusual readings.
- 90 and 10, or 95 and 5, for RSI(2), which swings across the whole scale within a few sessions.
- 60 and 40 as levels for pullbacks within a trend rather than for reversals, as the next section explains.
RSI in trends: the range shift
Analysts such as Andrew Cardwell and Constance Brown observed that RSI works within different ranges depending on the trend. In a rising market it tends to hold between about 40 and 80 and to make its lows near 40 to 50. In a falling market it tends to hold between about 20 and 60 and to make its highs near 50 to 60.
The model series shows the same pattern. During the fall, from day 36 to day 49, RSI(14) moved between 24.35 and 52.43 and never reached 60. During the recovery, from day 52 to day 72, it moved between 55.27 and 81.03; the pullback on days 60 and 61 took it only to 60.06 before the rise resumed.
Two uses follow:
- Pullbacks in a trend. In a rising market the usual pullback takes RSI to the 40 to 50 zone, not below 30. Waiting for 30 in an uptrend often means waiting for a reading that does not come.
- A change of regime. When RSI keeps failing to reach 60 on rallies after weeks of holding above 40, the trend has often changed. When it holds above 40 on dips after a long fall, buyers may have taken control.
The 50 line
RSI above 50 means the period's average gain is larger than its average loss. Many rule-based traders use the line as a trend filter: long trades only when RSI is above 50, short trades only below it.
On the model series RSI(14) dipped below 50 for three sessions during the early rise, on days 20 to 22, crossed below 50 on day 37 after the high and crossed back above it on day 52 after the low. The crossings on days 37 and 52 came on the same sessions that Nifty crossed its 20-day simple moving average and that MACD crossed its signal line. That is common, because all three are built from the same closes.
Like any filter, the 50 line gives false readings in a sideways market, as it did on days 20 to 22, when the index stayed within 20 points of 24,800.
Divergence and failure swings
Divergence
A divergence is a disagreement between the price and RSI. In a bearish divergence the price makes a higher high while RSI makes a lower high, so the second push up had less force behind it. In a bullish divergence the price makes a lower low while RSI makes a higher low. A hidden divergence points the other way, to a trend continuing: a higher low in price with a lower low in RSI during an uptrend, for example.
A divergence shows fading momentum, not a reversal, and a strong trend can produce several in a row before it turns. Traders who use divergences wait for a price trigger, such as a break of the last swing high or low, and place a stop beyond the extreme. The rules, model trades and stops are set out in the RSI divergence strategy.
Failure swings
Wilder placed more weight on failure swings than on divergences. A top failure swing has four steps: RSI rises above 70, falls back, rallies again but stays below its first peak, then falls below the low of the pullback. A bottom failure swing is the mirror image below 30. The signal comes from RSI alone, which makes it simple to write as a rule. Like every RSI signal, it needs testing on the instrument and timeframe before it is used.
RSI settings and periods
| Setting | Typical use | Levels often used |
|---|---|---|
| RSI(2) | Very short-term mean reversion on daily charts | 90 and 10, or 95 and 5 |
| RSI(7) or RSI(9) | Faster readings on intraday charts | 80 and 20 |
| RSI(14) | The default on daily and intraday charts | 70 and 30 |
| RSI(21) or RSI(25) | Slower readings for swing and positional trading | 65 and 35, or 70 and 30 |
A shorter setting averages fewer changes, so it swings further and reaches the extremes more often. On the model series:
| Setting | Readings | Above 70 | Below 30 | Above 80 | Below 20 |
|---|---|---|---|---|---|
| RSI(2) | 70 | 36 | 20 | 32 | 17 |
| RSI(7) | 65 | 28 | 13 | 13 | 5 |
| RSI(9) | 63 | 20 | 9 | 8 | 3 |
| RSI(14) | 58 | 11 | 3 | 1 | 0 |
| RSI(21) | 51 | 4 | 0 | 0 | 0 |
RSI(2) was above 70 on more than half its readings and above 90 on 24 of them. RSI(21) never reached 30, even during a 5.26% fall. The levels have to match the setting: 70 and 30 on RSI(2) mark ordinary days, not extremes.
Changing the setting until past signals look good is the most common way to overfit an RSI rule. A setting chosen on one year of data needs checking on other years, on other instruments and with the cost of every trade before it is trusted.
RSI on intraday charts
RSI is calculated the same way on any timeframe; only the length of each period changes. The NSE equity and F&O session runs from 9:15 am to 3:30 pm, or 375 minutes.
| Chart | Candles in one session | What 14 periods covers |
|---|---|---|
| 1-minute | 375 | 14 minutes |
| 5-minute | 75 | 70 minutes |
| 15-minute | 25 | 3½ hours |
| 60-minute | 7, the last one 15 minutes long | About two sessions |
| Daily | 1 | Almost three weeks |
Points that matter for intraday RSI on Indian indices:
- The opening gap. Nifty often opens away from the previous close on overnight news. On a 5-minute chart the first candle's change includes the whole gap, which can move RSI(14) sharply in one candle. Some traders ignore the first 15 minutes; others use a daily RSI for direction and an intraday RSI only for timing.
- Continuity across sessions. Most platforms carry the calculation from one session to the next, so the first readings of the day still contain yesterday's afternoon.
- Expiry days. Index option expiries can bring large, fast moves late in the session, and an intraday RSI that behaved well on other days can sit at an extreme for the last hour.
Combining timeframes
A common way to use RSI intraday is to take direction from a slower chart and timing from a faster one. With daily RSI(14) above 50, a trader looks only for long entries, and uses a dip of 15-minute RSI(14) to the 40 to 50 zone as the entry window. With daily RSI below 50, the same trader looks only for shorts on 15-minute rallies to 50 to 60. The slower chart keeps the faster one on the side of the trend; the faster one keeps the entry close to a level where a stop can be placed.
RSI on Nifty, Bank Nifty, stocks and options
- Index or futures chart. Most traders read RSI on the Nifty or Bank Nifty index, or on the near-month futures, and trade options or futures on that view. A continuous futures chart jumps at each monthly roll unless the data is adjusted, and the jump enters RSI as a gain or a loss.
- Option charts. An option's price falls with time decay and moves with implied volatility, so RSI on the option's own chart mixes three effects. A falling RSI on a call's chart may only mean that a day has passed.
- Stocks. RSI on a stock reacts to results, news and corporate actions, and a gap after results can put it at an extreme in one session. Volatile stocks often suit levels of 80 and 20.
- Other indices. RSI is a ratio of gains to losses, so its readings mean the same on any index or stock; the number of points behind them does not change the scale. That is one difference from MACD, which is measured in points.
Reading the model series with RSI
Read session by session, RSI(14) tells the story of the 72 days in four parts:
| Phase | What RSI(14) did | What it said |
|---|---|---|
| Days 15 to 28 | Moved between 45.97 and 66.33, dipping below 50 on days 20 to 22 | No clear trend; small rises and falls of similar size |
| Days 29 to 34 | Held above 70, peaking at 78.00 on day 32 | A fast rally, with gains far larger than losses |
| Days 35 to 49 | Fell from 61.10 to 24.35 on day 44, and stayed below 53 from day 36 | A fall strong enough to hold RSI in the lower range |
| Days 50 to 72 | Rose above 50 on day 52, then stayed between 55.27 and 81.03 | A recovery with steady gains and shallow pullbacks |
None of these readings forecast the next phase. They described the one in progress, and the clearest information came from the changes of range: RSI failing to recover 60 after day 35, and holding above 55 after day 52.
RSI with other tools
RSI reads one thing, the balance of recent gains and losses. Most rule sets pair it with something it cannot see.
| Pair RSI with | Why |
|---|---|
| A long moving average, such as the 200-day | Takes oversold readings only in a long-term uptrend |
| Support and resistance levels | An oversold reading at a known level says more than one in the middle of a range |
| Volume | A fall to oversold on light volume is weaker selling than one on heavy volume |
| VWAP on intraday charts | Puts intraday readings in the context of the day's average price |
| A volatility measure such as ATR | Sets stops and targets in points that suit the day's movement |
RSI and MACD are often used together: MACD for the direction of momentum, RSI for its extremes. MACD is built from moving averages rather than from gains and losses, so the two sometimes disagree, and the disagreement is information in itself.
RSI compared with other momentum indicators
| Indicator | What it measures | Range | Typical levels |
|---|---|---|---|
| RSI | Average gains against average losses | 0 to 100 | 70 and 30 |
| Stochastic oscillator | Close against the high-low range of the period | 0 to 100 | 80 and 20 |
| Stochastic RSI | RSI against its own high-low range | 0 to 1, or 0 to 100 | 0.8 and 0.2 |
| MACD | Gap between two exponential moving averages | Unbounded, in points | Zero line and signal line |
| Rate of change | Percentage change over N periods | Unbounded, in percent | Zero line |
The stochastic RSI, introduced by Tushar Chande and Stanley Kroll in 1994, applies the stochastic formula to RSI itself. It reaches its extremes far more often than RSI and is used for short-term timing.
The limits of RSI
- It lags. RSI is built from closes that have already happened, so its turns come after the price's turns, even if only by a session or two.
- It is bounded. In a long trend RSI flattens near an extreme while the price keeps moving, as in the last five sessions of the model series.
- It ignores the size of moves. A quiet market and a volatile one can show the same RSI, because RSI compares gains with losses, not with the market's usual range.
- It sees only closes. Intraday highs and lows, gaps within a candle and volume do not enter the formula.
- It is not a forecast. RSI describes what recent prices have done. A reading of 25 says the last fortnight was weak, not that the next one will be strong.
Common mistakes
- Selling every reading above 70. In an uptrend this sells into strength again and again. Check the trend first.
- Using RSI(2) with levels of 70 and 30. On a two-period RSI those levels mark ordinary days.
- Comparing values across platforms. Check the smoothing method and the start of the data before comparing a backtest with a chart.
- Reading RSI on an option's chart. Time decay pulls the option's price down whatever the index does.
- Treating a divergence as a signal on its own. Wait for the price to confirm it.
- Changing the period after each loss. A setting fitted to the last few trades rarely holds on the next ones.
Using RSI in a trading strategy
RSI appears in four common kinds of rule:
- Mean reversion. Buy when RSI is oversold in a market above its long-term average and exit when RSI recovers. Short settings such as RSI(2) on daily candles and RSI(14) on intraday candles are both tested this way; full rule sets, with Nifty examples and option versions, are in the RSI indicator strategy guide.
- Trend filter. Take long signals from another rule only when RSI is above 50, or above 40 in a strong uptrend.
- Momentum. Buy when RSI crosses above 60 after holding the 40 to 50 zone, on the view that the trend has resumed.
- Reversal. Trade divergences or failure swings with a price trigger and a stop.
Whatever the rule, three choices decide most of the result: the RSI period, the levels and the exit. Fix them before testing and change them only for reasons that hold across years, not because of the last few trades.
RSI in QuantPower
Where RSI use is going
RSI itself has not changed since 1978, and is unlikely to. What is changing is how it is used. More traders now write RSI rules as conditions that software checks on every closed candle, instead of reading the line by eye, which makes the period, the level and the candle size explicit and testable. Scanners run the same RSI condition across every F&O stock at once. AI assistants can write an RSI rule from a sentence, which makes it quicker to build one and easier to build too many. The traders who use RSI well are the ones who fix the setting and the exit before testing and judge the result after costs.
RSI in QuantPower
- On the chart. RSI is one of the 201 indicators on QuantPower's charts, with a default period of 14 and the period as your own input; Connors RSI and the stochastic are there too. Levels of 70 and 30, or any you choose, can be drawn on the RSI pane.
- As a condition. A signal algo can use RSI in its rule, for example RSI(14) crossing above 30 on the 15-minute Nifty chart, together with up to 19 other conditions in ALL and ANY groups, checked on closed candles from 1 minute to 1 week.6 The signal can notify you with the order ready, place the order once you arm it, or start an option algo. A live signal costs no tokens; an algo it starts is charged as a live algo, 200 tokens per 28 days.
- As an alert. An indicator-rule alert tells you when RSI crosses a level, once or every time, checked once per closed bar.
- In your own formulas. Arth Script has an
rsi()function, so a custom indicator such as the gap between RSI(14) and RSI(50) can be drawn and used in rules. - Tested first. A rule backtest runs the condition on up to 2,000 of your broker's past candles, with costs and slippage, and Forward test runs it on live prices before any real order.
Your account's controls sit above every algo: Smart Exit squares off and stops the algos when the account's target or stop is reached, the daily loss limit refuses new orders, and the kill switch stops a segment until its next session.
Start with 500 free tokens
Connect your broker, build a strategy and test it on paper before a single live order goes out.
Frequently asked questions
How is RSI calculated?
Take the change in each close over the period, average the gains and the losses separately with Wilder's smoothing, and divide the average gain by the average loss to get RS. RSI is 100 − 100 ÷ (1 + RS). With an average gain of 27.68 points and an average loss of 32.53 points over 14 days, RS is 0.851 and RSI is 45.97.
What is a good RSI value to buy?
There is no single value. In a market above its long-term average, many rule sets buy dips of RSI(14) to between 30 and 40, or of RSI(2) below 10. In a downtrend an oversold reading can stay oversold for days. Any level needs a trend filter, an exit and a stop, and testing on the market you trade.
What does an RSI of 50 mean?
That average gains and average losses over the period are equal, so RS is 1. Readings above 50 mean gains have been larger; readings below 50 mean losses have.
Why does RSI show different values on different charts?
The smoothing method, the amount of history loaded and the closing prices used all change the result. Some tools use simple averages instead of Wilder's smoothing, and a calculation that starts on a later date takes many periods to match one that started earlier.
Is RSI a leading or lagging indicator?
It lags, because it is calculated from past closes. Its turns usually come a session or two after the price's. Divergences and failure swings are the parts of RSI that traders use as early warnings.
What is the difference between RSI and relative strength?
RSI compares a price with its own recent gains and losses. Relative strength in the comparative sense divides one stock's price by another's, or by an index, to show which has done better. The names are similar, but the calculations are unrelated.
Related guides
- RSI indicator strategy: RSI mean reversion rules for Nifty, with option versions
- RSI divergence strategy: trading divergences with a price trigger
- MACD indicator: momentum from two exponential moving averages
- Technical indicators: the common indicators side by side
References
- J. Welles Wilder Jr., *New Concepts in Technical Trading Systems*, Trend Research, 1978
- Tushar Chande and Stanley Kroll, *The New Technical Trader*, Wiley, 1994
- Constance Brown, *Technical Analysis for the Trading Professional*, McGraw-Hill, 1999
- Larry Connors and Cesar Alvarez, *Short Term Trading Strategies That Work*, TradingMarkets, 2009
- SEBI, circular on safer participation of retail investors in algorithmic trading, 4 February 2025, in force for every broker from 1 April 2026 (sebi.gov.in)
- QuantPower: chart indicators, signal conditions, alerts and backtest limits, from docs/ALGO.md, docs/PRODUCT.md and the app's code, checked 12 November 2026