Part of the Indicator Math series. This installment breaks down the oscillator that gets mistaken for a countdown to the next turn.

Does RSI above 70 mean you should sell?

You see RSI hit 72 as a stock breaks out. Your platform calls it “overbought,” which sounds like a reason to get out or even go short. But the indicator hasn’t measured demand, valuation, or whether buyers are about to quit. It has measured the balance of recent up and down moves in the same stock.

The Relative Strength Index (RSI) turns that balance into a number from 0 to 100. It’s a bounded oscillator: it moves up and down but always stays between those two numbers. The reading can stay elevated while a trend continues, and it can drop below 70 on a pullback that doesn’t end the trend. Neither situation can be read from the threshold alone.

The RSI formula

J. Welles Wilder Jr. introduced RSI in his 1978 book New Concepts in Technical Trading Systems. Wilder suggested a 14-period calculation, and the traditional overbought and oversold reference levels are 70 and 30 (StockCharts’ guide to Wilder’s RSI). TradingView’s standard RSI defaults to 14 bars and uses the close. On a daily chart that means 14 daily price changes for the first value. On a five-minute chart it means 14 five-minute changes.

Change = Current close − Previous close
Gain = Change if positive, otherwise 0
Loss = Size of change if negative, otherwise 0

First avg gain = Sum of first N gains ÷ N
First avg loss = Sum of first N losses ÷ N

New avg gain = (Old avg gain × (N − 1) + Gain) ÷ N
New avg loss = (Old avg loss × (N − 1) + Loss) ÷ N

RS = Avg gain ÷ Avg loss
RSI = 100 − 100 ÷ (1 + RS)

N is the length setting. Each price change enters both series: an up bar contributes a positive gain and zero loss, a down bar contributes zero gain and a positive loss, and a flat bar contributes zero to both. For the first averages, divide each total by the full 14, not by the number of up or down bars. After that, use the previous average and the new observation. Wilder’s method gives the current bar a weight of 1 ÷ N and the previous average the rest. You’ll see the same smoothing weight in ATR and ADX, but applied to different inputs.

RS is short for relative strength, meaning the ratio of the two averages. The last line puts the ratio on the 0 to 100 scale. If average loss is zero and average gain is positive, RSI is 100. If average gain is zero and average loss is positive, it’s zero. If both are zero, the formula has no unique value. Check how your platform handles an all-flat series if that matters to your test.

A worked RSI example by hand

Start with these made-up daily stock closes. Fifteen closes give you 14 changes. Day 1 is a starting price, not a zero change to include in the average. If you’re following in a spreadsheet, start the Change, Gain, and Loss formulas on the second price row.

DayCloseChangeGainLoss
1100.00–––
2101.00+1.001.000.00
3100.50−0.500.000.50
4102.00+1.501.500.00
5102.000.000.000.00
6101.25−0.750.000.75
7102.50+1.251.250.00
8103.00+0.500.500.00
9102.50−0.500.000.50
10104.00+1.501.500.00
11103.00−1.000.001.00
12104.50+1.501.500.00
13104.00−0.500.000.50
14104.75+0.750.750.00
15105.25+0.500.500.00
Day 15 avg gain = 8.50 ÷ 14 ≈ 0.607143
Day 15 avg loss = 3.25 ÷ 14 ≈ 0.232143
Day 15 RS = (8.50 ÷ 14) ÷ (3.25 ÷ 14) ≈ 2.615385
Day 15 RSI = 100 − 100 ÷ (1 + RS) ≈ 72.34

Now add one close of $104.25 on Day 16. The gain is zero and the loss is 1.00. You don’t drop the first gain and recalculate a simple 14-bar average. Instead, you use the two averages you already computed. The values below are rounded for display only; use the unrounded values in your spreadsheet.

Day 16 avg gain = ((8.50 ÷ 14) × 13 + 0) ÷ 14
                ≈ 0.563776
Day 16 avg loss = ((3.25 ÷ 14) × 13 + 1) ÷ 14
                ≈ 0.286990
Day 16 RS = Avg gain ÷ Avg loss ≈ 1.964444
Day 16 RSI = 100 − 100 ÷ (1 + RS) ≈ 66.27

One down close took RSI from 72.34 to 66.27 while the smoothed gain stayed almost twice as large as the smoothed loss. That’s why “fell below 70” and “the downside now dominates” aren’t the same statement.

What RSI actually measures

RSI measures the share of smoothed close-to-close movement on the upside. When total smoothed movement is nonzero, you can also multiply average gain by 100 and divide by the sum of average gain and average loss. At 50, the two averages are equal. At 75, the average gain is three times the average loss. That doesn’t mean three out of every four bars closed higher. One outsized gain can outweigh several smaller losses.

The chart below pairs daily SPY prices with 14-period RSI and draws reference lines at 30, 50, and 70. In the shaded stretch, SPY rose while RSI hovered near or above 70. The threshold described the strength of those closes. It didn’t tell you the swing was over.

SPY daily candles with RSI(14) below and 30/50/70 lines; RSI holds near 70 for a month during the April–May rally.
SPY daily, Feb 2–Jun 30, 2026, with RSI(14): from Apr 14 to May 14 RSI stayed between 67 and 79 while SPY kept rising.

RSI doesn’t compare the instrument with a benchmark, despite “relative strength” in the name. It doesn’t count volume, measure movement inside a bar, or tell you the odds of the next close being higher. It also doesn’t tell you how large the moves were in dollars or points. Average gains of 3 and losses of 1 give the same reading of 75 as average gains of 0.30 and losses of 0.10. For stop distance, use something tied to the instrument’s price structure or volatility, not a fixed number of RSI points.

There’s another wrinkle worth checking on a chart. A higher close doesn’t need to take RSI above its last peak. A stock can push to a new high after a choppy pullback, and the losses from that pullback still count in the smoothed average. A higher price high paired with a lower RSI high is called bearish divergence. It tells you the balance of movement changed between those highs. It doesn’t tell you when, or even whether, price will turn.

How traders use RSI

  • Trend filter: For an ES intraday breakout plan, test allowing longs only when the last completed 15-minute RSI is above 50. The price breakout still triggers the trade. Keep the timeframe and hours fixed so you can compare the filter with the same entry rule on its own.
  • Range entry trigger: Once a stock has tested both edges of an identifiable range, test a long at the lower edge only if price closes back inside the range and RSI closes back above 30 on the same bar. Skip the test when price is breaking a range and continuing lower. A low RSI doesn’t establish support.
  • Pullback confirmation: In an existing uptrend, test requiring a dip below 50 followed by a close back above 50 while price still holds above the prior swing low. Make the price trigger and the order timing explicit, as you would for any written entry rule. If the swing low has broken, the RSI recovery alone doesn’t restore the setup.
  • Exit condition: On a trend trade already in profit, compare a rule that takes a partial exit after two completed closes with RSI below 50 against your usual exit rules. Specify the fraction in advance and keep your protective stop in place. RSI is testing whether the balance of movement has shifted, not capping the trade’s loss.

Where RSI fails

A trend can keep RSI extreme. If up moves continue to outweigh down moves, RSI can stay over 70 while price advances. In a tight range, RSI can keep crossing 50 with no follow-through. Decide whether you’re trying to trade a range or a trend before treating the same reading as an entry.

Shorter settings are more reactive, not more predictive. At seven bars, each new gain or loss gets twice the weight it would at 14. That can get you across a threshold sooner, or produce more crosses you didn’t need. Older bars also affect the previous smoothed average, so two calculations started at different dates can initially disagree. Use enough prior data to settle the starting values before you judge your test.

A cross on a live bar can disappear. The current close is just the latest price until the bar finishes, as TradingView’s repainting guide explains. If your historical rules act on completed bars, your alerts should use completed bars too. A 15-minute RSI on a five-minute chart isn’t confirmed just because the five-minute bar closed.

Takeaway: RSI compares the magnitude of smoothed gains with the magnitude of smoothed losses. Treat 30, 50, and 70 as ways to describe that balance. Then write down what price must do, which bars must be closed, and what would invalidate your trade before you ask RSI to help with the decision.

Next up: MACD: Two Moving Averages and the Gap Between Them

One thought on “RSI: What the Relative Strength Index Actually Measures”

Leave a Reply