Daily close data · MACD line detection

MACD Divergence Scanner & Histogram Guide

Bearish MACD histogram divergence can warn that momentum is slowing, but it cannot establish when price will reverse. Compare the rules below, then use this free scanner to find price versus MACD line divergences in daily stock data.

Scans 40 preset stocks or one symbol you enter. Results use the MACD line, not the histogram. Data availability depends on the provider.

Scan for Divergences

-

This scan uses daily closing-price and MACD line pivots, with five bars on each side. The pivot date is earlier than confirmation. Strength is a formula label, not a success probability. Missing data can leave symbols out; results are research candidates.

Divergence Signals

0 signals found

No Matches Returned

Try another symbol or adjust your filters. Missing data can also leave a symbol out.

Showing 0 divergence signals

Bearish MACD histogram divergence as a leading indicator

A smaller positive histogram bar means the gap between MACD and its signal line has narrowed. Price can still rise. Calling that change leading only makes sense after naming the event it is supposed to precede: a signal-line crossover, a price break or a profitable trade. Those are different outcomes.

With the 12/26/9 EMA settings used here, MACD = EMA(12) − EMA(26), signal = EMA(9) of MACD, and histogram = MACD − signal. TradingView explains these separate series in its MACD indicator documentation.

Contraction, peak divergence and zero crossings

ObservationWhat it establishesWhat it leaves open
Positive histogram bars become shorterMACD is closer to its signal line.No second price peak or confirmed reversal is required.
Higher price peak, lower histogram peakA price versus histogram bearish divergence under a stated pivot rule.Price may keep rising; MACD line peaks need not diverge.
Histogram crosses below zeroMACD has crossed below its signal line.MACD itself can remain above zero.
MACD line crosses below zeroThe fast EMA has moved below the slow EMA.This is a different event from histogram crossing zero.

Specify the comparison series. StockCharts also describes divergence between the MACD line and its histogram, including distinct peaks and sloping contraction. Its MACD-Histogram guide discusses anticipating signal-line crossovers. That definition should not silently replace a price versus histogram rule.

An illustrative bearish divergence and its timing

Suppose two confirmed closing-price peaks are $100 and $104, while their paired positive histogram peaks are 0.80 and 0.50. The second price peak is higher and the second histogram peak is lower. That meets a price versus histogram bearish-divergence rule. These are hypothetical values, not scanner results or a historical trade.

A five-right-bar pivot cannot be known at its peak. If price peaks on bar 50, it needs bars 51 through 55 before confirmation. If the paired oscillator peak is on bar 52, the pair is not confirmed until bar 57. Use the later confirmation time when testing an entry. A marker drawn back at bar 50 does not mean the signal was available then. TradingView documents this risk under repainting and plotting in the past.

For bullish divergence, reverse the comparison: price makes a lower low while the selected oscillator makes a higher low. Use the same price source, oscillator, pivot window and pairing rule for both directions. Switching from closes to candle highs or lows changes which pivots qualify.

What this scanner actually checks

  • It requests roughly 180 calendar days of daily history and requires at least 50 records. EMA calculations start with an SMA seed. Feed, adjustment and warm-up differences can produce values that differ from a TradingView chart.
  • Detection compares closing-price pivots with the MACD line. Each strict peak or trough must exceed or fall below all five neighbors on each side. Equal highs or lows do not qualify.
  • It considers adjacent pairs among the last three price pivots and finds the first MACD pivot within five bars from each, using the last three MACD pivots. It does not search every possible pair or enforce same-sign oscillator peaks.
  • Peak comparisons run before trough comparisons, and the first match is returned for each symbol. Results therefore are not a complete signal history or necessarily the most recent divergence.
  • Regular bearish divergence means a higher closing-price high and lower MACD high. Regular bullish divergence means a lower closing-price low and higher MACD low. Hidden labels use the opposite comparisons; no independent trend filter confirms continuation.

The table and CSV show the second price pivot date. Confirmation needs five later bars after both matched pivots; a current daily record may still change before the session closes. Review the chart and data timestamp before treating any match as final.

When the reversal idea fails

A trend can slow and then accelerate again. In the hypothetical bearish example, price might move above $104 while the histogram expands to a new peak. A lower histogram peak alone gives neither an entry price nor a maximum loss. Define a separate price trigger, a time limit for the setup and an invalidation level before testing it. The scanner does not implement those trade rules.

Test all qualifying signals from their confirmation dates, with the same holding period, fees and slippage. Compare the distribution of subsequent returns, adverse moves and drawdowns with a stated baseline. Keep a later period out of rule selection. Selected screenshots cannot establish that divergence adds predictive value.

The strength label is only a local formula: regular divergence is strong when the price change exceeds 3% and the MACD change exceeds 20% of the first MACD pivot's absolute value; moderate uses 1% and 10%. Other regular matches are weak. Hidden matches are always moderate. The ratio can be unstable near zero, and none of these thresholds is a measured probability.

Sources and next steps

Sources checked on October 16, 2026: TradingView's MACD and repainting documentation, and StockCharts' MACD-Histogram guide, linked above. Scanner-specific details come from this page's calculation and detection logic. For the arithmetic, use the MACD calculator. Browse the TradingView indicators guide for related chart concepts.

Educational information, not investment advice. Divergence does not guarantee a reversal or profit. Historical data can be delayed, missing or revised; verify a candidate on your chart before making a decision.

MACD divergence questions

Is bearish MACD histogram divergence a leading indicator?

It can precede a MACD signal-line crossover, but that is different from predicting a price reversal. The histogram is derived from past and current prices. A pivot-based rule also waits for later bars before confirming the second peak. Evaluate any apparent lead from the confirmation time, not the earlier pivot date.

Does this scanner detect histogram divergence?

No. It compares daily closing-price pivots with pivots in the MACD line, calculated as EMA(12) minus EMA(26). The calculation also produces a signal line and histogram, but those series are not passed to the divergence detector. Histogram divergence requires a separate rule and chart review.

What is MACD bullish divergence?

Regular bullish divergence pairs a lower price low with a higher MACD low. Regular bearish divergence pairs a higher price high with a lower MACD high. Hidden bullish and bearish divergence reverse those comparisons and are often interpreted in the context of trend continuation. This scanner labels the geometry; it does not confirm a trend or a trade entry.

What do the pivot date and strength labels mean?

The pivot date is the second price pivot, not the date a trader could first know the signal. Both price and MACD pivots need five later data bars. Strong and moderate labels use fixed percentage-change thresholds; hidden divergences are always labeled moderate. These labels are not measured win rates or reversal probabilities.

Which stocks and timeframe can I scan?

The default list contains 40 stocks. Entering a symbol requests that symbol instead. The scanner requests about 180 calendar days of daily history and skips symbols with fewer than 50 records. Sector, exchange and price filters narrow matching results; they do not expand the default stock list. Quotes and daily history may have different update times.

Is the scanner free, and what does an empty result mean?

This page has no subscription or sign-in step for scanning. An empty table means no matches were returned for the available data and filters. Missing history or failed data requests can also leave a symbol out, so an empty result is not proof that divergence is absent across the market.

Put your divergence rules into a script

Ask Pineify AI Coding Agent to use your chosen MACD series, pivot spacing, confirmation time and invalidation rule. Review the generated Pine Script and test its signals in TradingView before using it.

Explore Pine Script AI Coding Agent

Once a strategy produces exported trades, use Backtest Report to examine its trade outcomes and drawdowns. The scanner itself does not backtest signals or measure future returns.