Indicators

Divergence in Trading: The Four Types, RSI vs MACD vs Stochastic, and Why They Fail in Trends

Price makes a new high or low and the oscillator does not. The regular and hidden types, the rule we use to find them, and how many divergences the RSI, the MACD and the stochastic found on the S&P 500 ETF and on Bitcoin, with what followed.

· Founder of PatternsWizard
Checked 9 min read
MACD line, EMA(12) − EMA(26) with divergences, swingpoints with 5 bars on each side, at most 60 bars apart
On this page
  1. The four types of divergence
  2. How we find a divergence
  3. RSI, MACD or stochastic: the same rule on three oscillators
  4. When oscillators agree
  5. Why divergences fail in a strong trend
  6. Does it work?
  7. Frequently asked questions

A divergence is a disagreement between price and an oscillator. Price makes a higher high and the oscillator a lower high, or price makes a lower low and the oscillator a higher low: the move goes on, the momentum behind it does not. The idea is the same whatever the oscillator, RSI, MACD or stochastic. Below: the four types, the rule we use to find them, and a count of the divergences each of the three oscillators found on the S&P 500 ETF and on Bitcoin, with what followed.

MACD divergences on the S&P 500 ETF, marked by rule

781.6703.9626.1017.5−13.0Oct 30, 2025Apr 30, 2026Oct 28, 2026
  • Price, daily candles (hollow up, filled down)
  • MACD line, EMA(12) − EMA(26) (solid line)
  • Regular bearish: higher high in price, lower high in the oscillator
MACD line, EMA(12) − EMA(26) with divergences, swing points with 5 bars on each side, at most 60 bars apart on S&P 500 ETF, dividend-adjusted prices, daily, October 30, 2025 to October 28, 2026. Illustration of how the indicator reads, not a backtest.Each line joins two swing highs in price and the MACD values on the same bars. All five are regular bearish divergences, in a rising market.

The four types of divergence

The two regular divergences are the textbook ones. StockCharts gives them for the MACD: “A bullish divergence forms when a security records a lower low and the MACD forms a higher low”, and “a bearish divergence forms when a security records a higher high and the MACD line forms a lower high.” Its stochastic and RSI pages give the same definitions for those oscillators. A regular divergence is read as a possible reversal.

The two hidden divergences are read the other way, as a continuation. StockCharts describes them on its RSI page as Andrew Cardwell’s positive and negative reversals: a “positive reversal forms when RSI forges a lower low, and the security forms a higher low,” and a negative reversal is the opposite.

TypePriceOscillatorRead as
Regular bearishHigher highLower highUptrend losing momentum
Regular bullishLower lowHigher lowDowntrend losing momentum
Hidden bearishLower highHigher highDowntrend continuing
Hidden bullishHigher lowLower lowUptrend continuing

The four divergences, drawn with the RSI

Regular bearishPrice: higher highRSI: lower highRegular bullishPrice: lower lowRSI: higher lowHidden bearishPrice: lower highRSI: higher highHidden bullishPrice: higher lowRSI: lower low
Schematic, not market data. The RSI is read on the swing bars of price, not on its own peaks and troughs.Drawn with the RSI; the MACD line and the stochastic %K are read the same way, on the swing bars of price.

How we find a divergence

A divergence drawn by hand after the fact is easy to find and impossible to test. The MACD chart under the introduction, and every count on this page, uses one fixed rule:

A swing point is only known once the bars after it are in, so a divergence can be acted on 5 bars after its second swing at the earliest. Every return below starts from the close of that bar. The rule reads the oscillator on the swing bars of price; it compares each swing with the one just before it, never with an older one.

RSI, MACD or stochastic: the same rule on three oscillators

The rule was run on the full daily history of the site's test bench, from January 29, 1993 for the S&P 500 ETF (dividend-adjusted prices) and from August 17, 2017 for Bitcoin, both to October 28, 2026, with the RSI(14), the MACD line (12, 26) and the slow stochastic %K (14, 3). Each oscillator needs its own warm-up, so its first usable bar differs. “Expected direction” means a lower close 20 bars after confirmation for a bearish divergence and a higher one for a bullish divergence. The last column is what chance gives for the same mix of cases: the share of all days, from the first usable bar, with a lower close 20 bars later, applied to the bearish cases, and with a higher close, applied to the bullish ones.

MarketOscillator, first usable barRegular (bearish, bullish)HiddenExpected direction after 20 barsBy chance
S&P 500 ETFRSI, April 1, 1993139 (107, 32)11651 of 139 (37%)42%
S&P 500 ETFMACD, June 30, 1993126 (108, 18)11541 of 126 (33%)39%
S&P 500 ETFStochastic, February 24, 1993150 (117, 33)15754 of 150 (36%)41%
BitcoinRSI, September 29, 201752 (26, 26)5925 of 51 (49%)50%
BitcoinMACD, November 30, 201745 (22, 23)6130 of 45 (67%)50%
BitcoinStochastic, September 3, 201762 (34, 28)6728 of 62 (45%)50%

The last Bitcoin RSI divergence is too recent to have 20 bars after it, so that line counts 51 cases out of 52.

Regular divergences followed by a close the expected way 20 bars later, full history

S&P 500 ETF, RSI51 of 139S&P 500 ETF, MACD41 of 126S&P 500 ETF, stochastic54 of 150Bitcoin, RSI25 of 51Bitcoin, MACD30 of 45Bitcoin, stochastic28 of 62
Our computation; the inputs and the method are in the text.Daily bars from January 29, 1993 (ETF) and August 17, 2017 (Bitcoin) to October 28, 2026, from each oscillator’s first usable bar. By chance: 39% to 42% on the ETF, about 50% on Bitcoin (table above).

On the ETF every line is below chance. The ETF closed higher 20 sessions later on 65% of all days since 1993, so most bearish divergences were followed by a rise: with the RSI, 33 of 107 bearish cases were followed by a lower close (31%), against 34.5% of all days. On Bitcoin, the RSI and the stochastic sit at chance. The MACD is the only line above it, 30 of 45 against about 50%: one line out of six, on 45 cases, is not a result to rely on.

When oscillators agree

In the 600-bar window ending October 28, 2026, from June 7, 2024 onward, and from November 2024, when all three oscillators are usable, five ETF highs were flagged as bearish divergences by the RSI, the MACD and the stochastic at once, each against the same earlier high. Twenty sessions after confirmation, the ETF was higher after four of them.

Second swingFirst swingAfter 20 sessions
June 11, 2025May 19, 2025+5.36%
July 31, 2025June 11, 2025+2.37%
October 10, 2025September 23, 2025+1.13%
January 28, 2026December 26, 2025−0.71%
June 2, 2026May 14, 2026+2.25%

Agreement between oscillators is not independent evidence: all three are built from the same prices.

Why divergences fail in a strong trend

StockCharts says it plainly on its MACD page: “Bearish divergences are commonplace in a strong uptrend, while bullish divergences occur often in a strong downtrend.” The ETF shows it. Over its full history since 1993, the MACD’s 108 bearish divergences were followed by a lower close twenty sessions later 28 times (26%), against 34.5% of all days. In 2025, the MACD found four bearish divergences confirmed between June 18 and October 17, 2025, and the ETF closed higher twenty sessions after each of them; over those four months it went from 587.69 to 657.30, an 11.8% rise.

Second swing (MACD bearish)Confirmed, closeAfter 5 sessionsAfter 10After 20
June 11, 2025, high 595.19June 18, 2025: 587.69+2.72%+4.98%+5.36%
July 31, 2025, high 631.27August 7, 2025: 623.77+2.01%+0.52%+2.37%
August 13, 2025, high 637.53August 20, 2025: 629.55+1.34%+1.73%+3.78%
October 10, 2025, high 666.76October 17, 2025: 657.30+1.94%+2.66%+1.13%

S&P 500 ETF change 20 sessions after each MACD bearish divergence, 2025 and 2026

June 11, 2025+5.36%July 31, 2025+2.37%August 13, 2025+3.78%October 10, 2025+1.13%December 26, 2025+0.26%January 28, 2026−0.71%June 2, 2026+2.25%July 15, 2026+2.90%September 22, 2026+0.71%
Our computation; the inputs and the method are in the text.Each bar is dated by the second swing high; the change runs from the close 5 sessions later, when the divergence is known, to the close 20 sessions after that. A bearish divergence expects a fall: only one was followed by one.

The MACD chart under the introduction covers the last 250 sessions and shows the last five of these divergences, from December 2025 to September 2026. Twenty sessions after confirmation, the ETF was lower once, after the January 28, 2026 high (−0.71%), and higher after the four others (+0.26%, +2.25%, +2.90%, +0.71%). Hidden bullish divergences, which point the other way, went with the trend: with the MACD, the ETF was higher twenty sessions later after 5 of 6, against 319 of 475 sessions (67%) for any day of the period from November 6, 2024, too few cases to call it better than the base rate.

Does it work?

Divergences are not part of our bench, which tests chart patterns detected by rule against random entries, not indicators (see our methodology), so we ran the rule separately. On the full daily history of our two markets, regular divergences did worse than chance on the ETF, which mostly rose, and about as well as chance on Bitcoin, with one exception, the MACD on Bitcoin at 30 of 45 against about 50%, which a single line out of six does not establish. A divergence says momentum has slowed; it does not say when or whether price will turn. Price confirmation, such as the break of a trendline, a lower high in Dow theory terms or the neckline of a head and shoulders, is a separate signal.

Related pages: RSI divergence with every Bitcoin signal, the MACD, the stochastic oscillator, the RSI, and the list of technical indicators.

Frequently asked questions

What is a divergence in trading?

A disagreement between price and an oscillator: price makes a higher high while the oscillator makes a lower high (bearish), or price makes a lower low while the oscillator makes a higher low (bullish).

What is the best indicator for divergence?

None has been shown to be. On the full daily history of our two markets, the MACD on Bitcoin did best, 30 of 45 regular divergences the expected way after twenty bars against about 50% by chance, and the MACD on the S&P 500 ETF worst, 41 of 126 against 39%. One line out of six does not rank indicators.

What is regular bullish divergence?

Price makes a lower low while the oscillator makes a higher low. It is read as a downtrend losing momentum, a possible reversal up.

What is hidden divergence?

The oscillator makes the new extreme and price does not: a higher low in price with a lower low in the oscillator (hidden bullish), or the reverse (hidden bearish). It is read as a continuation of the trend.

How do you confirm a divergence?

StockCharts suggests a price confirmation, such as a support or resistance break, or for the stochastic a cross of 50. With a rule like ours, the swing itself must first be confirmed, 5 bars after it forms.

Sources

  1. StockCharts ChartSchool, MACD (Moving Average Convergence/Divergence Oscillator)
  2. StockCharts ChartSchool, Stochastic Oscillator: Fast, Slow and Full
  3. StockCharts ChartSchool, Relative Strength Index (RSI)
, Founder of PatternsWizard

Passionate about finance, quantitative trading and data analysis. Amaury built the PatternsWizard test bench, which detects each pattern on full price history and measures what happened next against random entries.

PatternsWizard tests chart and candlestick patterns on full market history, against random entries. How we test patterns.

179 patterns testedRandom-walk self-test passed

All indicators articles