RSI examples — lower pane, dashed lines at 70 and 30Sample data · not a real stock
What to look forSee how RSI stays above 70 for a long time during a strong rise.
Caution“Overbought” only describes a big rise; it does not mean a fall is coming.
1260 bars · 2018-10-29 – 2023-08-25
On price
Lower panes
Auto
Sample (synthetic) data: not a real stock or real prices, but prices generated to explain the idea. Drag the chart to move through time and use the wheel or two fingers to zoom.
Concept
RSI (Relative Strength Index), introduced by J. Welles Wilder in 1978, shows whether the gains on up days or the losses on down days were larger over the last N days (usually 14).
Above 50 means recent gains were larger than recent losses.
Above 70 is often called “overbought” and below 30 “oversold”.
If the price only rises it approaches 100; if it only falls it approaches 0.
The purple line in the lower pane is RSI. Change the period to 7 or 28 and compare how much more or less sensitive the line becomes.
How it is calculated
Gain Uₜ = max(Pₜ − Pₜ₋₁, 0), Loss Dₜ = max(Pₜ₋₁ − Pₜ, 0)
First averages: AU = mean of U over the first N days, AD = mean of D
Then: AUₜ = (AUₜ₋₁ × (N − 1) + Uₜ) ÷ N (same for AD)
RS = AU ÷ AD, RSI = 100 − 100 ÷ (1 + RS)
This site uses Wilder’s original method (exponential smoothing). Some tools use simple averages, so values can differ slightly.
If the average loss is 0, RSI is 100; if there is no movement at all, it is set to 50.
The results were tested against known values from published example data.
Cautions when reading it
Overbought does not mean a fall: in strong uptrends RSI can stay above 70 for a long time. Find stretches on the chart where the price keeps rising after RSI passes 70.
Same for oversold: in downtrends RSI can stay below 30 and the price can keep falling.
Divergence: when the price makes a new high but RSI does not, it is called a divergence — but it is confirmed late and often wrong.
The lines are a convention: some use 80 and 20 instead of 70 and 30. Change the lines and the “signals” change too.
Chart shapes and indicators summarize past prices. The same shape is sometimes right and sometimes wrong depending on the market, and this page does not tell you when to buy or sell any stock. To practice yourself, try the chart lab or mock trading.