GlossaryRelative Strength Index (RSI)

Relative Strength Index (RSI)

The Relative Strength Index compares the average price gains of the latest candles with the average price losses and maps the ratio onto a scale from 0 to 100. It tells you how much strength is behind a move and when a market is overextended in the short term.

Calculation

The RSI only uses the closing prices CtC_t of the candles on your chart. nn is the RSI length.

1. Gains and losses per candle. Each change from the previous close is split into a gain part and a loss part, neither of which is ever negative:

Δt=Ct−Ct−1,Gt=max⁡(Δt, 0),Lt=max⁡(−Δt, 0)\Delta_t = C_t - C_{t-1}, \qquad G_t = \max(\Delta_t,\ 0), \qquad L_t = \max(-\Delta_t,\ 0)

2. Starting value. The first averages are the simple mean of the first nn changes:

Gˉn=1n∑t=1nGt,Lˉn=1n∑t=1nLt\bar G_n = \frac{1}{n} \sum_{t=1}^{n} G_t, \qquad \bar L_n = \frac{1}{n} \sum_{t=1}^{n} L_t

3. Wilder smoothing. After that, each new candle enters with a weight of 1/n1/n:

Gˉt=(n−1) Gˉt−1+Gtn,Lˉt=(n−1) Lˉt−1+Ltn\bar G_t = \frac{(n-1)\,\bar G_{t-1} + G_t}{n}, \qquad \bar L_t = \frac{(n-1)\,\bar L_{t-1} + L_t}{n}

4. RSI.

RSt=GˉtLˉt,RSIt=100−1001+RSt\mathrm{RS}_t = \frac{\bar G_t}{\bar L_t}, \qquad \mathrm{RSI}_t = 100 - \frac{100}{1 + \mathrm{RS}_t}

If Lˉt=0\bar L_t = 0, there were no losses in the smoothed window and the RSI stands at 100. The first value appears on candle n+1n+1, because the very first candle has no predecessor to compare with.

Note Wilder smoothing is not an EMA. Its factor is 1/n1/n instead of 2/(n+1)2/(n+1), so at length 14 about 0.071 instead of 0.133. An EMA-based RSI reacts almost twice as fast and reaches 70 on moves that Wilder's RSI still sees in the sixties. The RSI here calculates like the common charting platforms.

How to read it

  • Zones: From the Overbought level (default 70) the curve is red, at the Oversold level (default 30) and below it is green, in between gray. Both zones are shaded in the pane.
  • 50 line: Above it, gains outweigh losses on average; below it, losses do. It is seen as the boundary between upward and downward momentum.
  • Return from the zone: The classic signal is not reaching 70 or 30, but falling back below 70 or rising back above 30.
  • Divergences: If the price makes a higher high but the RSI a lower one, the move has lost strength. The mirror image applies at the low.
  • Trend ranges: In strong uptrends, the RSI often swings between about 40 and 80, in downtrends between about 20 and 60. Overbought there does not mean the move is ending.

Settings

SettingDefaultEffect
RSI length14Length nn for starting value and smoothing (2–50). Shorter reacts faster and reaches the zones more often.
Overbought level70Upper threshold on the Thresholds tab (50–100): zone, reference line and red coloring.
Oversold level30Lower threshold on the Thresholds tab (0–50): zone, reference line and green coloring.

The thresholds only change the display, not the calculated value.

Limitations

  • The smoothing has a long memory. The first few dozen values at the left edge of the history therefore still depend on the starting value; after that, the RSI practically matches that of a longer history.
  • It only sees closing prices. Wicks and volume play no role.
  • In a trend, the RSI can stay in an extreme zone for a long time. There it is no good as a sole counter-signal.

Related indicators