The RSI indicator: formula, signals and settings
The RSI (Relative Strength Index) is a momentum indicator that measures the strength of recent gains and losses on a scale from 0 to 100. J. Welles Wilder introduced it in 1978, and it is still one of the most widely used technical indicators.
How is the RSI calculated?
The RSI compares the average gain with the average loss over a period, usually 14 candles:
- For each candle, take the change in the close from the previous one. Rises count as gains, falls as losses.
- Calculate the average gain and the average loss over the period.
- Find the relative strength:
RS = average gain / average loss. - Turn it into the RSI:
RSI = 100 − 100 / (1 + RS).
Example: over the last 14 candles, the average gain is 1.2 and the average loss 0.8. RS = 1.2 / 0.8 = 1.5, so RSI = 100 − 100 / 2.5 = 60.
In Wilder's original method, the averages are smoothed with each new candle. Some platforms instead use the plain sum of gains and losses over the last N candles. Both point the same way, but the values are not identical.
How to read the RSI
- Above 70, “overbought”: price has risen a lot in a short time, and a pullback may be more likely.
- Below 30, “oversold”: price has fallen a lot in a short time, and a rebound may be more likely.
- The 50 line: an RSI holding above 50 shows upward momentum dominating; below 50, downward momentum.
- Divergence: if price makes a new high while the RSI makes a lower high, the rally may be losing strength. The reverse, price making a new low while the RSI makes a higher low, can signal a weakening decline.
What is a good RSI level?
There is no single right number; the RSI has to be read in context, not as a buy or sell button:
- In a strong uptrend the RSI can stay above 70 for weeks. That alone is not a sell signal, which is why 80/20 thresholds are often used in strong trends.
- In sideways markets, 70/30 works better: as price nears the edges of its range, the RSI moves to the extremes too.
- Looking at where the RSI has turned in a stock's own history tells you more than general thresholds.
Choosing the period
Wilder recommended 14 periods, and that is still the most common setting. Shorter periods (6–9) make the RSI more sensitive: it reaches the extremes more often and gives more signals. Longer periods (21–24) give a smoother line that only shows clear extremes. Plotting a short and a long period together makes it easy to compare short-term swings with the main trend.
Limitations of the RSI
The RSI is derived from price, so it does not lead price; it only measures how fast price is moving. An overbought stock can keep rising and an oversold one can keep falling. The RSI works better alongside trend indicators, such as moving averages or MOST, and the company's financials.
The RSI in Gonofin
- The RSI is added to the technical chart as a lower pane. By default three periods are drawn together: 6, 12 and 24. You can change them, and add the classic 14 if you like.
- Gonofin calculates the RSI from the plain sum of gains and losses over the last N candles. Values may differ slightly from platforms that use Wilder's smoothed method.
- You can set alerts on the RSI, for example “RSI crosses above 30” or “RSI turns up”, and get an email when they trigger. See price and indicator alerts.
This guide is for information only and is not investment advice. No indicator guarantees future price movements.
Last updated: