RSI indicator explained: formula, settings, 70/30 and divergence
What is the RSI indicator?
The RSI indicator (Relative Strength Index) is a momentum oscillator created by J. Welles Wilder in 1978. It compares the size of recent up-closes with recent down-closes and expresses the result on a scale from 0 to 100.
A high RSI means recent gains have been much larger than recent losses; a low RSI means the opposite. RSI does not measure price level or value. It measures how one-sided the recent movement has been.
It is not related to "relative strength" comparisons between a stock and an index; the name is a historical accident.
avg gain, avg loss = Wilder's smoothed averages of gains and losses over N (default 14)
RS = avg gain / avg loss
RSI = 100 − 100 / (1 + RS)
The RSI formula step by step
The standard RSI uses 14 periods and Wilder's smoothing, a kind of slow exponential average.
- For each candle, find the change: close minus previous close. Positive changes are gains; negative changes, made positive, are losses. A candle that is up has a loss of zero, and vice versa.
- For the first value, average the last 14 gains and the last 14 losses.
- After that, smooth them: avg gain = (previous avg gain × 13 + current gain) / 14. The same for losses.
- RS = avg gain / avg loss.
- RSI = 100 − 100 / (1 + RS).
If average gain equals average loss, RS is 1 and RSI is 50. If there are no losses at all, RSI is 100. Because of the smoothing, RSI needs a decent history (ideally a few hundred candles) before it matches across platforms.
RSI settings: 14, 9 or something else?
The default RSI setting is 14, with levels at 70 and 30. Changing the length changes behaviour:
- Shorter (7 to 9): more sensitive, reaches extremes more often, more noise.
- Longer (21 to 25): smoother, rarely reaches 70 or 30, slower to turn.
For the best RSI setting for intraday, many traders keep 14 on a 5-minute or 15-minute chart and change the timeframe rather than the length. Some scalpers use 9 with levels at 80/20. Whatever you pick, the levels should match: shorter lengths need wider bands.
RSI 70 and 30: overbought and oversold
Readings above 70 are called overbought and below 30 oversold. These words mislead many beginners.
What 70 really means
RSI 70 means gains have dominated losses for the last 14 candles. That is a description of strength, not a forecast of a fall. In a strong NIFTY trend day, the 5-minute RSI can stay above 70 for an hour or more while price keeps rising.
Range regime vs trend regime
Analyst Andrew Cardwell and others observed that RSI moves within different ranges depending on the trend:
- In an uptrend, RSI tends to range roughly 40 to 80; pullbacks often hold around 40 to 50.
- In a downtrend, RSI tends to range roughly 20 to 60; rallies often fail around 50 to 60.
- In a sideways market, RSI swings between about 30 and 70, and the classic overbought/oversold reading works best.
So the first question is never "is RSI above 70?" but "what regime is the market in?" A trend tool like ADX or the slope of a moving average answers that.
RSI divergence: regular and hidden
RSI divergence is when price and RSI disagree at swing points.
Regular (classic) divergence
- Bearish: price makes a higher high, RSI makes a lower high. Upward momentum is fading.
- Bullish: price makes a lower low, RSI makes a higher low. Downward momentum is fading.
Hidden divergence
- Hidden bullish: price makes a higher low, RSI makes a lower low. Often seen on pullbacks inside uptrends; a sign the trend may continue.
- Hidden bearish: price makes a lower high, RSI makes a higher high.
How to draw divergence correctly
- Use clear swing highs or lows on price, not every small wiggle.
- Compare RSI at the same candles as the price swings.
- Prefer divergence at a known level: a previous day high, a liquidity sweep, an order block.
- Wait for price itself to confirm, for example a change of character on a lower timeframe.
Divergence can repeat several times in a strong trend before price turns, so it is a warning, not a trigger. The same logic applies to order-flow delta divergence.
Failure swings and the 50 line
Wilder himself valued failure swings more than overbought or oversold readings.
- Top failure swing: RSI rises above 70, pulls back, rallies again but fails to exceed 70, then breaks below its own pullback low.
- Bottom failure swing: the mirror below 30.
The 50 line is a simple trend filter: RSI holding above 50 means gains outweigh losses; below 50, losses dominate. Crosses of 50 on a higher timeframe often mark a change in momentum regime.
RSI strategy for intraday: a framework
An RSI strategy for intraday works best as a filter at levels, not as a standalone trigger. A framework many traders study:
- Decide the regime on a higher timeframe (15-minute or 1-hour): trend up, trend down, or range.
- Mark levels: previous day high and low, opening range, VWAP, CPR. See intraday key levels.
- In an uptrend, watch pullbacks to a level where 5-minute RSI holds 40 to 50 and turns up.
- In a range, watch the edges where RSI reaches 70 or 30 and price rejects the level.
- Confirm with the candle and footprint at the level: absorption, a rejection wick, a shift in delta.
- Define where the idea is wrong before anything else.
Trading F&O carries a high risk of loss; no RSI rule removes that.
Worked example: BANKNIFTY RSI divergence (illustration)
This is an illustration with plausible numbers, not a real trade record.
BANKNIFTY futures rally from 51,600 to 52,050 by 10:45 IST. The 5-minute RSI peaks at 76. After a pullback, price pushes to 52,110 at 12:10, a new high, but RSI only reaches 64: a regular bearish divergence.
The new high takes out the earlier peak and the previous day high at 52,080, then closes back below it. The footprint at 52,100 shows heavy buying that fails to lift price, a sign of absorption. A minute later the 1-minute chart breaks its last higher low.
A trader studying this sees three things lining up: divergence, a sweep of a known high and absorption. None of them alone is enough. If price instead accepted above 52,110 with RSI rising, the divergence would simply be cancelled.
Common RSI mistakes
- Fading strong trends just because RSI is above 70 or below 30.
- Drawing divergence between random points instead of clear swings.
- Changing settings to fit the last week of data.
- Using RSI, Stochastic and Williams %R together; they measure nearly the same thing (see stochastic oscillator).
- Ignoring the timeframe: a 1-minute oversold reading means little inside a 1-hour downtrend.
Seeing it on the TradingMarble chart
On the TradingMarble chart you can add RSI with your own length and levels under NIFTY, BANKNIFTY and F&O charts, next to structure, liquidity zones and the footprint. That makes it easy to study how momentum readings line up with price reaction at levels. The full toolset is on the features page.
RSI checklist
- What is the regime: trend or range?
- Is the RSI reading normal for that regime?
- Is any divergence drawn between real swings?
- Is price at a level that matters?
- Does price action or order flow confirm?
- Where is the idea invalid?
Read this way, the RSI indicator is a clean gauge of momentum and a useful second opinion at the levels you already trust.
Frequently asked questions
What is RSI in trading?
RSI, the Relative Strength Index, is a momentum oscillator that compares average gains with average losses over a period (usually 14) and scales the result from 0 to 100. Higher readings mean recent gains dominated; lower readings mean losses dominated. It describes the strength of recent movement, not whether price is cheap or expensive.
What do RSI 70 and 30 mean?
Above 70 is called overbought and below 30 oversold. In ranges, these extremes often coincide with turns. In trends, RSI can stay above 70 or below 30 for long periods while price continues. Treat them as signs that a move is stretched, and check whether the market is trending before reading them as reversal warnings.
What is the best RSI setting for intraday?
The default 14-period RSI with 70/30 levels on a 5-minute or 15-minute chart is the most common intraday setup. Some scalpers use 9 with 80/20 levels for more sensitivity. Changing the chart timeframe is usually more useful than changing the length. Keep one setting and learn how it behaves.
What is RSI divergence?
RSI divergence is when price and RSI disagree at swings. Bearish divergence: price makes a higher high while RSI makes a lower high. Bullish divergence: price makes a lower low while RSI makes a higher low. It shows fading momentum but can repeat several times in a trend, so traders wait for price confirmation.
What is hidden divergence in RSI?
Hidden divergence points to trend continuation. Hidden bullish divergence is a higher low in price with a lower low in RSI, usually on a pullback in an uptrend. Hidden bearish divergence is a lower high in price with a higher high in RSI. It works best when the higher-timeframe trend is clear.
Is RSI good for NIFTY options trading?
Traders usually read RSI on the NIFTY spot or futures chart, not on the option premium, because option prices are affected by time decay and volatility. RSI can help judge underlying momentum. It should be combined with levels, structure and a risk plan, since F&O trading carries a high risk of loss.