Definition · Technical Analysis

Relative Strength Index (RSI): Formula, 70 and 30, and Divergence

The relative strength index turns recent gains and losses into one number between 0 and 100. It measures momentum, and the popular 70 and 30 lines are habits of reading it.

AI-assisted, reviewed by the TrueMoneyTrading human editor: John James → 3 min read Published

DefinitionSeen on: Chart

Relative strength index A momentum oscillator from J. Welles Wilder that scales recent average gains against recent average losses into a reading from 0 to 100, usually over 14 periods.

Also called RSI, Wilder's RSI.

Why is RSI still at 78 in week three of a rally? Because it is supposed to. RSI rises when gains outweigh losses, and a stock in a steady uptrend has more up days than down days for as long as the trend lasts, so the reading stays high the whole way. Sell every cross of 70 and you exit the best trades first.

The formula

RSI = 100 - 100 / (1 + RS), where RS is the average gain divided by the average loss over the lookback, usually 14 periods.

Each period, an up close adds its gain and a loss of zero. A close below counts the other way. Wilder smoothed both averages the same way he smoothed average true range: start with a simple average of the first 14, then keep thirteen parts of the old average and add one part of the new value each period.

Gains ran half again as large as losses. That puts RSI at 60, a little above the midpoint. Equal gains and losses give RS of 1 and RSI of 50. With no losses at all, RSI goes to 100. The scale also compresses near the ends, because RS is a ratio: a reading of 70 needs RS of about 2.33, a reading of 80 needs RS of 4, so gains have to grow by more than two-thirds against losses to push RSI just ten points higher.

How it shows up on a chart

RSI sits in its own panel under price. The scale runs 0 to 100. Lines mark 70 and 30, and often a dotted 50. The line wanders between them.

Those lines are conventions. Wilder proposed them, charting software kept them as defaults, and traders came to read anything above 70 as overbought and anything below 30 as oversold, although some shift them out to 80 and 20 for volatile stocks so the lines get touched less often. The numbers carry no special property.

Where RSI sits relative to 50 is often more useful. Readings that keep bouncing off 40 and turning up are a common look in an uptrend; readings that keep failing near 60 show up in downtrends. That kind of reading suits a trend follower. The mean reversion trader leans on the extremes, and the tension between those uses is set out in trend following or mean reversion.

Divergence

Bearish divergence is price making a new high while RSI makes a lower high. Bullish divergence mirrors it: a new low in price, a higher low in RSI. Divergence is easiest to see when you mark the two price peaks and the two RSI peaks directly above and below each other, and if the peaks do not line up in time, you are comparing the wrong swings.

Read it as a warning. The move is continuing on less momentum than the one before it, which can mean it is running out of buyers, or can simply mean the new high came on a slower climb, and plenty of divergences end with price carrying on in the same direction for weeks. Wait for price to confirm first. A close under the last swing low is one way it does.

What people get wrong

Fading every 70 reading is the classic error, covered above.

A second is confusing RSI with relative strength against an index. The two share a name and little else. Relative strength compares one stock’s performance with a benchmark, often shown as a ratio line, and says whether the stock is leading or lagging the market. RSI compares a stock only with its own recent closes.

A third is trading RSI on a chart with no trend context, because the same 30 reading means one thing on a stock above a rising 200-day average, where it may mark an ordinary pullback, and something else on a stock below a falling one.

The MACD is the other momentum reading most charts carry. It is built from moving averages instead of gains and losses. Swing trading indicators worth keeping weighs RSI against the rest. For the basics of reading charts, see the technical analysis topic.

Questions traders ask next

What RSI setting is best for swing trading?

Wilder's original 14 periods is the default on most charts and a reasonable place to stay. Shorter settings such as 7 or 9 swing between the extremes more often and give more readings above 70 or below 30. Longer ones move less. Changing the length changes how often the lines get touched, which is worth knowing before you build a rule around them.

Should I sell when RSI goes above 70?

Selling on a 70 reading alone tends to get you out of the strongest stocks early, because RSI can sit above 70 for weeks in an uptrend. Traders who use the level usually wait for RSI to turn back below it, or for price to break its own trend, before acting.

Is a bullish RSI divergence a buy signal?

It is a warning that selling pressure is fading while price still makes lower lows. Many divergences resolve with price continuing down. Treat one as a reason to watch the chart for a price signal of its own, such as a higher low or a close above a recent swing high.