Calculation
gain = max(close − close[1], 0), loss = max(close[1] − close, 0) avg gain = RMA(gain, 14), avg loss = RMA(loss, 14) Wilder's smoothing, α = 1/14 RSI = 100 − 100 / (1 + avg gain / avg loss)
Wilder's moving average (RMA) is an exponential average with α = 1/n, started from a simple average. RSI is 100 when there was no loss and 0 when there was no gain, as in TradingView's built-in RSI.
Overbought and oversold in a range

In a trend: the range shift

Analysts such as Andrew Cardwell and Constance Brown observed that the RSI shifts its range with the trend: roughly 40–80 in uptrends (pullbacks find support around 40–50) and 20–60 in downtrends. A failure to reach 70 in an uptrend, or a drop below 40, then says more than an overbought reading.
Case study: a bullish divergence

A divergence shows a loss of momentum, not a reversal by itself: in strong trends divergences can repeat several times before price turns. Wait for price confirmation (a break of the last swing high for a bullish divergence).
Limits
- Overbought means strong, not expensive: in trends the RSI can stay above 70 for long periods.
- The RSI needs a warm-up: its first value appears after 14 bars and early values depend on where the data starts.
Charts in this guide use simulated prices generated for illustration; levels and outcomes shown are examples, not observations of a real market. Educational content only, not investment advice.