The Relative Strength Index (RSI) is a momentum oscillator that compares the size of a stock's recent gains with the size of its recent losses and expresses the balance on a scale from 0 to 100. Readings near 100 mean gains have dominated; readings near 0 mean losses have.
How it works
J. Welles Wilder introduced the RSI in 1978, with a standard length of 14 sessions. For each day, the change in the close is recorded as a gain (if positive) or a loss (if negative, taken as a positive number). Then:
- Average gain and average loss are smoothed with Wilder's method: average today = (average yesterday × 13 + today's value) ÷ 14. This is an exponential average with α = 1 ÷ 14.
- RS = average gain ÷ average loss.
- RSI = 100 − 100 ÷ (1 + RS).
An RS of 1, where average gains equal average losses, gives an RSI of 50. If there were no losses at all in the period, RSI is 100. Because the smoothing carries a memory of earlier data, an RSI calculated from a short price history can differ from one calculated from years of data; most platforms converge after a few dozen sessions.
Despite the name, the RSI does not compare a stock with the market. That comparison is relative strength, a different measure.
How to read it
- 70 and 30. Wilder treated readings above 70 as overbought and below 30 as oversold. These describe how stretched the recent move is, not a signal that it must reverse.
- Trend shifts the range. In a strong uptrend, RSI(14) often holds between 40 and 80 and can stay above 70 for weeks; in a downtrend it tends to hold between 20 and 60. A dip to 40 in an uptrend can be more useful than a reading of 30.
- The 50 line. RSI above 50 means average gains exceed average losses over the window, a simple read of short-term momentum.
- Divergence. When price makes a higher high but RSI makes a lower high, the advance is losing speed. Divergences can persist through several further highs, so many traders wait for price to confirm, for example by breaking a support level.
- Length changes behavior. Short lengths such as RSI(2) swing between extremes almost daily and are used for short-term mean-reversion trades; longer lengths are smoother and slower.
Worked example (illustrative numbers)
A stock's 14-day average gain is $1.20 and its average loss is $0.80. RS = 1.20 ÷ 0.80 = 1.5, so RSI = 100 − 100 ÷ 2.5 = 60.
The next session closes $2.00 higher. The loss for the day is zero.
| Step | Calculation | Result |
|---|---|---|
| New average gain | ($1.20 × 13 + $2.00) ÷ 14 | $1.257 |
| New average loss | ($0.80 × 13 + $0) ÷ 14 | $0.743 |
| RS | 1.257 ÷ 0.743 | 1.69 |
| RSI | 100 − 100 ÷ 2.69 | 62.9 |
A strong day moved RSI less than three points, because the 14-day smoothing gives each new day about 7% of the weight. Several strong days in a row are needed to push RSI(14) above 70.
Limitations and common mistakes
- Selling every overbought reading. The strongest stocks spend long stretches above 70. Fading them on RSI alone means trading against the trend.
- Buying every oversold reading. In a crash, RSI can sit below 30 while price keeps falling. Many mean-reversion systems buy dips only when the stock is above its 200-day moving average.
- Judging by win rate alone. Short-term RSI systems often win most trades but lose more on the average loser than they make on the average winner.
- Tuning the thresholds. Picking the length and levels that fit past data best rarely holds up; see backtesting.
- Comparing across platforms. Small differences in smoothing and history length change the value slightly.
In Clear Tape
Clear Tape calculates RSI Wilder's way on split-adjusted daily bars, matching TradingView's built-in RSI. In trading systems, your own rules can use RSI of any length from 2 to 252 sessions, compared with a number or with crossovers; one starting template buys when RSI(14) crosses above 30 while the close is above the 200-day SMA, sells when RSI(14) rises above 70, and places the stop 2 × ATR(14) below entry. The preset RSI-2 Dip in Uptrend, based on the strategy published by Larry Connors and Cesar Alvarez, buys when RSI(2) is 5 or lower at the close while the stock is above its 200-day SMA, and exits on a close above the 5-day SMA or, failing that, after 10 sessions; it adds a 3 × ATR(14) disaster stop that the original rules do not use. Building systems is free; watchlist screening, signals on the price chart and backtests are available to Tools and Pro members.
For educational purposes only. Not investment advice.