Trading education · Trading indicators

RSI Indicator Explained: Formula, Levels and Divergence

Understand the RSI formula, 30 and 70 levels, Wilder smoothing and divergence. Work through an example and learn where RSI interpretations fail.

By Updated 5 min read
Saved resources

The short answer

RSI compares smoothed upward and downward price changes on a bounded 0–100 scale. High readings describe strong recent upward movement relative to downward movement. They do not mean price must reverse or that a short position is justified.

In this guide 8 sections
A schematic RSI line moves through reference levels at 30 and 70, staying above 70 for part of the example.
Illustrative RSI path. Crossing a threshold and remaining beyond it are both possible.

What RSI measures.

The Relative Strength Index, associated with J. Welles Wilder, summarises the balance between recent gains and losses in the same instrument. It does not compare that instrument with a market benchmark, despite the words “relative strength”. The common setting is 14 periods; on an hourly chart, its initial calculation uses 14 hourly changes, not 14 days. Wilder smoothing then carries earlier history forward, so 14 is not a hard cutoff that discards every older change.

Fidelity: RSI definition and calculation describes the indicator and the conventional 30 and 70 reference levels. Those levels are descriptive thresholds. Price can continue falling with a low RSI, or continue rising with a high RSI, so “oversold” is not synonymous with undervalued.

Use completed observations when studying a close-based rule. RSI on the current candle moves as that candle's price changes. A momentary crossing that disappears before the close is different from a confirmed close-based crossing.

Calculate RSI and understand the smoothing.

RS = average gain ÷ average loss

RSI = 100 − 100 ÷ (1 + RS)

For a conventional 14-period Wilder calculation, begin with 14 consecutive price changes, requiring 15 closes. Separate each change into a non-negative gain and a non-negative loss magnitude. The first averages are the arithmetic means of those 14 values.

For later observations, update each average as (previous average × 13 + new value) ÷ 14. This differs from recalculating a rolling simple average each time. It also differs from the usual EMA coefficient 2 ÷ (n + 1). The TradingView calculation notes use Wilder-style running averages. Confirm your platform’s method before comparing values.

If average loss is zero and average gain is positive, the limiting RSI value is 100; if gain is zero and loss is positive, it is 0. If both are zero, the formula is indeterminate, and software conventions can differ. Initialisation and the amount of warm-up history can also cause small discrepancies.

An original numerical example.

Suppose the current smoothed average gain is 1.5 price units and average loss is 0.5. RS is 3, making RSI 75. These are arbitrary price-change units, not a live instrument quote.

The next close falls by 2 units. The new gain is zero and the new loss is 2. Applying a 14-period Wilder update gives an average gain of (1.5 × 13) ÷ 14 = 1.392857 and an average loss of (0.5 × 13 + 2) ÷ 14 = 0.607143. RSI becomes approximately 69.64.

The indicator has crossed below 70 after one decline. That arithmetic does not tell us whether the next close will be higher or lower. It demonstrates how the current change interacts with the existing smoothed history, which is why a fixed price move does not always create the same RSI change.

Try it: Both smoothed averages are positive and equal to 0.8. What is RSI? Does that prove the price has been flat?

Check your answer

RS = 0.8 ÷ 0.8 = 1, so RSI is 50. Gains and losses balance under this smoothing; price could have moved substantially in both directions. A reading of 50 is not proof of a flat chart.

Distinguish levels, momentum and divergence.

Different RSI observations answer different questions
ObservationWhat it recordsWhat it does not prove
Above 70 / below 30An extreme balance of recent gains versus losses under this setting.That the current trend is finished.
Crossing 50Smoothed gains and losses changing relative balance.A profitable timing rule after costs.
Bearish divergenceA higher price high alongside a lower RSI high.The timing or size of a reversal.
Bullish divergenceA lower price low alongside a higher RSI low.That a falling market has reached its final low.

For a divergence study, define which completed swings are being compared and when they became identifiable. Connecting whichever two points look best after a reversal produces a persuasive picture but an unusable test.

A useful counterexample is a trend that makes three successive higher highs while RSI makes lower highs. A trader who shorts each divergence may take repeated losses before any reversal occurs. Keep that possibility in the explanation, rather than showing only the final successful turn.

Choose a question before changing the settings.

A shorter lookback responds to fewer observations; a longer lookback smooths over more history. Neither is inherently the best setting for forex, gold or a particular timeframe. Changing both the timeframe and lookback changes the question you are asking.

For an educational comparison, keep one price dataset fixed and examine 7-, 14- and 21-period RSI using the same smoothing and warm-up method. Record how frequently each crosses a threshold, how many crossings reverse promptly, and what the complete entry/exit rule would cost. Reserve a later, untouched period for evaluation.

Avoid treating MACD and RSI agreement as two independent votes. Both are transformations of price history. A separate observation about execution costs or an approaching scheduled economic release may answer a different question more usefully.

Work through it yourself.

Follow RSI, moving-average and MACD calculations using an editable practice price series.

Download indicator calculation workbook Excel workbook · editable formulas

Free to download without registering. Practice examples explain the method; they do not establish a profitable strategy.

Common RSI questions.

Is RSI above 70 a sell signal?

It is a conventional high-reading threshold, not an instruction. Strong trends can keep RSI elevated. A trading rule needs separate entry, exit, invalidation and cost assumptions.

Why does my RSI differ from another chart?

Compare the instrument feed, timeframe, closing prices, lookback, smoothing, warm-up history and whether the current bar is complete. Matching only the label “RSI 14” may not match all inputs.

Can RSI predict a reversal?

RSI describes historical changes. A divergence or threshold crossing can be a hypothesis for study, but this guide provides no predictive accuracy or profitability claim.

Sources & assumptions.

Written by InsomniCapital. Content checked on 4 October 2026. Schematics and hypothetical calculations are labelled educational illustrations. Historical observations identify their source, dates and method separately. Neither is a live quote, trade recommendation or reported trading result.

Educational information only, not personalised investment advice. Leveraged trading carries a high risk of loss. Read our risk disclosure. InsomniCapital has an Axi affiliate relationship and may receive compensation for qualifying referrals. References are not endorsements of this guide.

Trading AcademyModule 4: Trading indicatorsLesson 24 of 45Not studiedCheckpoint not passed

In this lesson

  • Relate RSI to smoothed gains and losses.
  • Separate a threshold observation from a reversal forecast.
Course outline

The complete course

8 modules. One clear path.

Follow the lessons in order, or return to a topic when you need it. Every lesson is open.

01Forex trading fundamentals10 lessons · Not started

Check brokers, rehearse a demo workflow, then study quotes, orders, costs, exposure and the demands of a trading day.

  1. Forex trading for beginnersNot studied
  2. How to Check a Forex Broker’s RegulationNot studied
  3. How to Use a Forex Demo AccountNot studied
  4. Forex order typesNot studied
  5. How to Place, Manage and Close a Forex TradeNot studied
  6. Spreads, slippage and swapsNot studied
  7. Margin and leverageNot studied
  8. Margin calls and stop-outsNot studied
  9. Day trading, swing trading and scalpingNot studied
  10. Forex market hoursNot studied

Take the module assessment

02Position sizing and risk management7 lessons · Not started

Connect price distances, contract assumptions and combined currency exposure to cash risk, payoff and drawdown.

  1. Stop-loss distances in pipsNot studied
  2. EUR/USD position sizingNot studied
  3. JPY pip valuesNot studied
  4. Position sizing with trading costsNot studied
  5. Forex Correlation and Combined Currency ExposureNot studied
  6. Risk-reward ratiosNot studied
  7. Drawdown and recoveryNot studied

Take the module assessment

03Price action and chart patterns5 lessons · Not started

Work from completed observations to candles, zones, multiple timeframes and clearly stated pattern boundaries.

  1. Price action tradingNot studied
  2. Candlestick patternsNot studied
  3. Support and resistanceNot studied
  4. Multiple Timeframe Analysis in ForexNot studied
  5. Chart patternsNot studied

Take the module assessment

04Trading indicators3 lessons · Not started

Study what moving averages, RSI and MACD calculate before interpreting a signal.

  1. Moving averages: EMA and SMANot studied
  2. RSI indicatorNot studied
  3. MACD indicatorNot studied

Take the module assessment

05Gold trading and XAU/USD4 lessons · Not started

Identify the product, translate lots into ounces and work through results and position sizing.

  1. Gold trading for beginnersNot studied
  2. Gold contract sizes and lot sizesNot studied
  3. Gold profit and lossNot studied
  4. Gold position sizingNot studied

Take the module assessment

06Economic indicators and central banks9 lessons · Not started

Read currency drivers, inflation, growth and policy announcements with their expectations and revisions.

  1. Central banks and currency pricesNot studied
  2. Nonfarm payrolls (NFP)Not studied
  3. CPI inflationNot studied
  4. PCE inflationNot studied
  5. GDP growth and revisionsNot studied
  6. PMI explainedNot studied
  7. Retail sales explainedNot studied
  8. Central bank decisionsNot studied
  9. FOMC meetingsNot studied

Take the module assessment

07Forex strategies and backtesting5 lessons · Not started

Define a reproducible study, audit its assumptions and work through breakout, trend and range examples.

  1. Forex trading strategiesNot studied
  2. Backtesting trading strategiesNot studied
  3. Breakout trading strategiesNot studied
  4. Trend-following strategiesNot studied
  5. Range trading strategiesNot studied

Take the module assessment

08Trading psychology and signals2 lessons · Not started

Review the process behind a result and the records needed to assess a performance claim.

  1. Trading psychologyNot studied
  2. Forex signals explainedNot studied

Take the module assessment

Lesson 24 checkpoint

Put the reading into practice

Work it through

Use average gain 1.5 and average loss 0.5 to calculate RSI. Write why the resulting value alone cannot decide the next price direction.

Check your understanding

1. If average gain is 1.5 and average loss is 0.5, what is RSI under RSI = 100 − 100 ÷ (1 + RS)?
2. RSI is above 70. Which interpretation is justified by that fact alone?
3. Two 14-period Wilder RSI calculations use identical recent 14 price changes but different earlier history. Can their current values differ?

The checkbox records study; answering every checkpoint question correctly records a separate pass. Try the module assessment for a mixed question set. Read the evidence standards for how examples and claims are presented.