How is RSI calculated?
The usual setting is 14 sessions. For each session you note how much the close rose or fell from the session before. The first average gain = the sum of the rises ÷ 14, and the first average loss = the sum of the drops ÷ 14. A down day counts as a gain of zero and an up day as a loss of zero, so you always divide by all 14 sessions, not by the up days or the down days alone. Then you divide the average gain by the average loss. The result is called RS, and it becomes a number from 0 to 100 with the formula RSI = 100 − 100 ÷ (1 + RS).
That is only the first average. After it, the original method (Wilder smoothing) updates both averages with each new session: the old average keeps 13 parts in 14 and the new session change gets one part. So figures on charting tools may differ slightly from a hand calculation over the last 14 sessions alone.
The 70 and 30 zones
Above 70 is called "overbought" and below 30 "oversold". The names suggest the price must turn back, but what the number really says is simpler: with a 14-session setting, the smoothed average gain is clearly larger than the smoothed average loss, or the reverse.
So what is it good for?
RSI is useful as a quick description of how strong the recent move has been. A reading near 50 means gains and losses are balanced. A high reading means the recent rise was strong, which should prompt questions: what is behind the move, and is there volume with it? And you can compare two stocks with it, since it always sits between 0 and 100 whatever the share price.
See RSI on a real stock
Open any stock chart on FoudaLens, add the RSI pane, and find the last time it crossed 70. See what the price did next instead of assuming.
Check yourself
1. Average gain 0.20, average loss 0.20. What is RSI?
2. RSI has been above 70 for three weeks. What does that describe?
Summary
- RSI compares the smoothed average gain with the smoothed average loss, with a 14-session setting, and gives a number from 0 to 100.
- Above 70 or below 30 describes a strong one-way move, not a buy or sell signal.
- In a strong trend RSI can stay in the high or low zone for a long time.