What is the RSI indicator?

The Relative Strength Index is a momentum oscillator: it measures how fast and how far price has moved recently, not where price is. J. Welles Wilder Jr. published it in 1978 in his book New Concepts in Technical Trading Systems, the same book that introduced the Average True Range (ATR) and the Parabolic SAR.

Despite the name, RSI does not compare a stock with the market or with another stock. It compares the stock with its own recent past: were the up moves over the last 14 bars bigger than the down moves, and by how much? A reading near 100 means almost all the recent movement was up, near 0 almost all of it was down, and around 50 the two roughly balanced.

RSI is one of the first tools most traders meet, and it belongs inside a bigger process of trend, levels and risk that our technical analysis for beginners guide lays out. On its own it answers one question: is momentum building or fading?

How is RSI calculated? The formula in plain words

You never need to calculate RSI by hand, since TradingView does it for you. But the steps explain its behavior: why one big bar barely moves it, and why it can sit at an extreme for most of a trend.

A hypothetical example: over the last 14 bars the average gain is $0.30 and the average loss is $0.15. RS is 0.30 ÷ 0.15 = 2, so RSI = 100 − 100 ÷ 3 = 66.7. If the next bar gains $0.44 with no loss, the new average gain is (0.30 × 13 + 0.44) ÷ 14 = $0.31, the average loss shrinks to about $0.139, and RSI only rises to about 69. When average gains equal average losses, RSI is exactly 50. With no losses at all, it reads 100.

TradingView computes these averages with RMA, its name for Wilder's smoothed average. Because that average never fully forgets older bars, RSI values can differ slightly between platforms that load different amounts of history. The steps, with the default length of 14:

  1. For each bar, take the change from the previous close. A rise counts as a gain and a drop as a loss, written as a positive number; the other side is zero for that bar.
  2. For the first value, take the simple average of the gains and of the losses over the last 14 bars.
  3. From then on, use Wilder smoothing: new average gain = (previous average gain × 13 + current gain) ÷ 14, and the same for losses. Each new bar gets a weight of 1/14, and older bars fade gradually instead of dropping out at once.
  4. Relative strength: RS = average gain ÷ average loss.
  5. RSI = 100 − 100 ÷ (1 + RS).

What do RSI 70 and 30 mean? Overbought and oversold

Wilder treated readings above 70 as overbought and below 30 as oversold, and those are still the default lines on TradingView's built-in RSI, with a middle line at 50. Overbought means price has risen fast compared with its recent declines. It does not mean price is too high, and it does not mean a drop is due. Oversold is the mirror image.

The drawing at the top shows the textbook picture: during the fall the RSI line dips under the dashed 30 line, labeled oversold, and later in the rise it climbs above 70, labeled overbought. Read those labels as a description of what just happened. Sellers moved price fast, then buyers did.

The 70 and 30 lines work best in a sideways market, where price keeps turning at the same support and resistance. There an oversold reading at support, or an overbought one at resistance, lines up with a level that already matters. In a trend they work much worse, as the next section shows.

Why overbought is not a sell signal in a strong trend

In a strong uptrend buyers keep winning bar after bar, so average gains stay far above average losses and RSI can hold above 70 for hours on an intraday chart, or for weeks on a daily one. Selling because RSI is overbought means betting against the very strength the reading describes.

A hypothetical failed trade on a 5-minute chart: a stock gaps up on news and climbs from $100.00 to $101.20 in the first 30 minutes, with RSI at 78. A trader shorts at $101.20 because RSI is overbought, with a stop at $101.60, $0.40 of risk per share. RSI stays between 70 and 85 for the next hour, price never pulls back more than $0.30, and the stop is hit on the next push. With 150 shares that is a $60 loss, and the stock goes on to $102.50.

The same happens in reverse: in a heavy downtrend RSI can stay under 30 while price keeps sliding, and buying every oversold reading means catching one falling knife after another. In a strong trend, read an extreme reading as strength in the trend's direction. If you want in, wait for a pullback toward a level instead of fading the move, and do not chase a fresh entry far from any level just because momentum looks strong.

RSI in a trend: the 40–80 and 20–60 ranges and the 50 line

A common rule of thumb says RSI shifts its range with the trend. In an uptrend it tends to swing between about 40 and 80, and dips into the 40–50 area often hold. In a downtrend it tends to swing between about 20 and 60, and rallies often stall around 50–60. Some references draw the bands wider, 40–90 and 10–60, and the zones move with the RSI length and the stock's volatility. Treat them as rough zones, not exact lines.

Used that way, RSI tells you whether a trend is behaving normally. In an uptrend, a pullback that cools RSI to 40–50 while price holds a support level is the kind of dip trend traders look for, and a drop well below 40 warns that the uptrend is weakening. In a downtrend, a bounce that lifts RSI to 50–60 at resistance is where sellers often return, and a push above 60 is the warning.

The 50 line is the simplest filter of all. Above 50, average gains outweigh average losses; below 50, the reverse. Many traders favor longs only while RSI on a higher timeframe is above 50, and shorts only while it is below. TradingView can show that directly: the built-in RSI has a Calculation section with a Timeframe dropdown, so a 5-minute chart can display the 1-hour RSI. Tick Wait for timeframe closes so the value only updates when the higher-timeframe bar closes; otherwise the live value can repaint. Our multi-timeframe analysis guide covers the method.

Turn your phone sideways to read the drawing. Tap to close.

A 5-minute chart beside three small green candles for the 15-minute, 30-minute and 1-hour timeframes, each marked with an up arrow, under a note about the 3 higher timeframes: check the bigger frames before trusting a reading on the small one.

How to trade RSI oversold at support: a worked example

Here is how the 30 line can help when a level does the heavy lifting. The numbers are hypothetical. A stock has spent two days between support at $48.00–$48.20 and resistance at $50.00, and its 1-hour RSI sits near 50, so no strong trend is pushing against a long. On the 15-minute chart, price drops into the support zone, touches $48.05, and RSI reads 27.

Oversold is not the trigger. The trigger is a candle that closes back above the zone: the next 15-minute candle closes at $48.50 and RSI turns up to 34. You buy at the next open, around $48.50, with a stop at $47.90 under the zone, $0.60 of risk per share. The target is $49.70, just under resistance, for $1.20 of reward, twice the risk. If you risk $60 on the trade, that is 100 shares; the position size calculator does the math.

Now the failure, which shows up just as often. Suppose the candle after the touch closes at $47.95, below the zone, with RSI at 24. There is no trade: support broke, and oversold is getting more oversold. And if you are already long and a candle closes below $47.90, you are out for the planned $60. The stop comes from the level, never from the RSI reading. The stop loss and take profit and risk/reward ratio guides go further.

Whether you check this by hand or with a tool such as UpTickFlow, our invite-only TradingView indicator that waits for a closed candle at a level, draws the entry, stop and target, scores the setup from 0 to 100 and stays quiet in chop, the order of the checks is the same. Use any tool as a second opinion on whether the level is worth trading, not as a replacement for your own read:

  1. Level: price is at a support or resistance zone you marked before it got there.
  2. Context: the higher timeframe is not trending hard against the trade.
  3. Reading: RSI is under 30 at support, or over 70 at resistance.
  4. Trigger: a candle closes back on your side of the level.
  5. Plan: stop beyond the level, target before the next level, size from the stop.

RSI divergence: when price and momentum disagree

Divergence is the other classic RSI signal. Bullish divergence is a lower low on price with a higher low on RSI; bearish divergence is a higher high on price with a lower high on RSI. It says the move is losing momentum, not that it is over, and in a strong trend it can print two or three times before price turns.

The drawing below shows the bullish version: price slides to a lower low while the RSI panel makes a higher low, and the buy signal comes only after the second low, once a candle closes higher. The same rules apply as above: compare confirmed swings, take it only at a level, and wait for the close. TradingView's built-in RSI marks divergences when you tick Calculate Divergence. The full method, with hidden divergence and a worked trade, is in our RSI divergence guide.

Turn your phone sideways to read the drawing. Tap to close.

Price makes a lower low while the RSI panel below makes a higher low, so the two lines slope in opposite directions: a bullish divergence. A green buy triangle prints after the second low.

What are the best RSI settings for day trading?

Start with the default: length 14, levels 70 and 30. It is what Wilder proposed, what TradingView loads, and what most traders and guides refer to, so your readings mean the same as everyone else's. No setting is best for every stock or every day.

Shorter lengths, such as 7 or 9, make RSI more sensitive: it reaches 70 and 30 far more often and flips faster, which means more readings and more false ones. Longer lengths, such as 21, smooth it out and rarely touch the extremes. If you shorten the length, a common adjustment is to widen the levels to 80 and 20 so only the stronger extremes count.

Watch the open. On an intraday chart the first bars of the day are calculated together with yesterday's last bars, so a gap at the 9:30 a.m. ET open counts as one large gain or loss and can push RSI to an extreme in a single bar. With extended hours switched on, pre-market bars are part of the calculation too. Give readings in the first minutes of the session less weight; the US stock market hours guide has the full schedule.

The chart timeframe changes more than the length does, because 14 bars cover very different stretches of trading. Many day traders keep 14 and choose the timeframe instead:

  • 1-minute chart: RSI (14) covers the last 14 minutes, so it mostly measures noise.
  • 5-minute chart: 70 minutes of trading.
  • 15-minute chart: three and a half hours, about half a session.
  • 1-hour chart: with extended hours off, a US regular session has seven 1-hour bars (the last one is 30 minutes long), so 14 bars cover about two days.

How to add the RSI indicator on TradingView

RSI is built into TradingView and free on every plan. The steps are below. Once it is on the chart, you can set an alert for RSI crossing a level instead of watching it; our TradingView alerts guide shows how. For the rest of a clean chart, see the best TradingView settings and the best TradingView indicators.

  1. Open a chart and click Indicators in the top toolbar, or press the / key.
  2. Type Relative Strength Index (or RSI) and pick the built-in version by TradingView. It opens in its own panel under the price chart.
  3. Hover over the RSI name in that panel and click the gear icon to open Settings. On the Inputs tab, leave RSI Length at 14 and Source at close to start.
  4. Tick Calculate Divergence if you want TradingView to mark divergences; divergence alerts only fire with it on.
  5. Under Smoothing, a moving average of RSI can be drawn on the panel; depending on the version it defaults to SMA or None. Choose None if you want only the RSI line.
  6. Under Calculation, the Timeframe dropdown computes RSI from a higher timeframe; tick Wait for timeframe closes when you use it.
  7. On the Style tab, RSI Upper Band, RSI Middle Band and RSI Lower Band sit at 70, 50 and 30. Change them there if you prefer 80 and 20.

Common RSI mistakes

RSI is simple, which makes it easy to misuse. Indicators like it fail often, and most of the damage comes from a few habits:

  • Selling every reading above 70 and buying every reading below 30, even in a strong trend.
  • Ignoring location. An oversold reading at a marked support level is information; the same reading in the middle of a range is not. See the support and resistance strategy.
  • Acting before the candle closes. RSI on the live bar moves with every tick, and a dip under 30 can disappear by the close. Judge closed candles only, as explained in how to read candlesticks.
  • Changing the length after every loss. A setting tuned to last week's chart rarely fits next week's.
  • Stacking oscillators. RSI, Stochastic and MACD all measure momentum, so three of them agreeing is one opinion counted three times. Pair RSI with something that measures a different thing: a level, volume or the trend.
  • Trading without a stop. RSI never tells you where you are wrong. The chart does, and the stop belongs beyond the level.