Illustrative chart
RSI Gain Loss Oscillator
What to notice
The 70 and 30 lines are reference zones. Momentum can stay elevated or depressed during persistent trends.
Common mistake
Automatically selling above 70 or buying below 30 without trend, structure, and risk context.
The relative strength index (RSI) is a bounded momentum oscillator developed by J. Welles Wilder Jr. It compares the magnitude of recent upward closes with recent downward closes and expresses the result between 0 and 100. Despite its name, standard RSI measures one instrument against its own prior prices; it is not the same as relative-strength comparison between two securities.
Build RSI from gains and losses
Start with close-to-close changes. Positive changes become gains, while negative changes become losses recorded as positive magnitudes. A period cannot contribute to both columns. For the initial (n)-period calculation:
Average gain = sum of gains / n
Average loss = sum of losses / n
RS = Average gain / Average loss
RSI = 100 - 100 / (1 + RS)
The conventional lookback is 14 periods, although the timeframe still determines what “14” represents. If average loss is zero, RSI is conventionally 100. Software may handle a completely unchanged series differently, so flat-data edge cases deserve inspection.
Understand Wilder smoothing
After the initial averages, Wilder’s method updates rather than recalculating a simple rolling average:
New average gain = ((Prior average gain × (n - 1)) + Current gain) / n
New average loss = ((Prior average loss × (n - 1)) + Current loss) / n
This smoothing retains declining influence from older changes. A platform using a simple moving average of gains and losses can therefore display a different oscillator even when both are labeled RSI. The chosen close, adjustment method, session boundary, warm-up history, and rounding can also explain small discrepancies.
Shorter lookbacks make RSI more reactive and more likely to reach extremes. Longer lookbacks create a steadier oscillator but recognize momentum changes later.
Interpret levels, ranges, and divergence
Readings above 70 and below 30 are commonly labeled overbought and oversold. Those labels describe unusually one-sided recent movement; they do not mean price must reverse. During a persistent advance, RSI can remain elevated while price continues higher. During a persistent decline, it can remain depressed.
The oscillator’s range can add context. In some uptrends, pullbacks repeatedly stabilize above deeply oversold territory; in some downtrends, rallies fail below the highest zone. These are observations to test, not fixed laws.
Divergence compares swing behavior. Bearish divergence occurs when price makes a higher high while RSI makes a lower high; bullish divergence is the reverse. Divergence says momentum changed relative to price. It does not specify when, or whether, price will turn.
Worked example: a five-period RSI
Use a shortened five-period lookback for illustration. Suppose six closes produce these five changes:
+2, -1, +3, -2, +4
The gain series is 2, 0, 3, 0, 4, totaling 9. The loss series is 0, 1, 0, 2, 0, totaling 3.
Average gain = 9 / 5 = 1.80
Average loss = 3 / 5 = 0.60
RS = 1.80 / 0.60 = 3.00
RSI = 100 - 100 / 4 = 75.00
Now suppose the next change is -1. Wilder’s updates are:
New average gain = (1.80 × 4 + 0) / 5 = 1.44
New average loss = (0.60 × 4 + 1) / 5 = 0.68
The new RS is about 2.118, giving an RSI near 67.92. Momentum weakened and RSI left the conventional overbought zone, but the calculation alone says nothing about the next price direction.
Practical RSI checklist
- Confirm that the implementation uses Wilder smoothing and sufficient warm-up data.
- Record timeframe and lookback; a daily RSI and five-minute RSI answer different questions.
- Establish trend or range context before interpreting 70 and 30.
- Compare oscillator swings with clearly defined price swings rather than forcing divergence.
- Wait for a stated confirmation rule if the analysis requires more than an extreme reading.
- Test thresholds across instruments and volatility regimes without optimizing each chart after the fact.
- Include realistic signal timing and costs when evaluating any rule.
The checklist keeps RSI as evidence within a process instead of turning one number into a complete decision.
Limitations and false signals
RSI uses only price changes, so it does not directly measure volume, liquidity, fundamental value, or event risk. An extreme reading can persist, and repeated attempts to anticipate a reversal can accumulate losses. Divergence may appear several times before price changes direction, disappear as a bar develops, or resolve through sideways movement rather than reversal.
Thresholds are not equally informative in every instrument or regime. A low-volatility range and a news-driven trend can generate the same reading for different reasons. Related momentum oscillators often use similar inputs, so apparent confirmation may not be independent. Finally, calculating a signal from a closing price and assuming execution at that same close can overstate historical results.
Key takeaways
- RSI compares smoothed gains with smoothed losses on a 0–100 scale.
- Standard RSI usually means a 14-period lookback with Wilder smoothing.
- Overbought and oversold describe momentum conditions, not mandatory reversals.
- Divergence identifies disagreement between price and momentum but has uncertain timing.
- Trend context, fixed definitions, and realistic testing are essential.
This guide provides general education only, not personal investment advice or a recommendation. Momentum signals can fail, and gaps, liquidity changes, execution costs, and leverage can materially increase trading losses.
Sources and further reading
Editorial review completed 16 July 2026.

