Forex
Indicator

Indicator: What Is MACD? Reading Crossovers and Momentum

Last updated 2026-07-14

MACD (Moving Average Convergence Divergence) is a trend-following momentum indicator that shows the relationship between two moving averages of price. It's one of the most widely used indicators because it captures both trend direction and momentum in a single view.

The Three Parts of MACD

  • MACD line — the difference between the 12-period EMA and the 26-period EMA.
  • Signal line — a 9-period EMA of the MACD line itself, used as a trigger for entries.
  • Histogram — the gap between the MACD line and the Signal line, plotted as bars. A growing histogram means momentum is building; a shrinking one means momentum is fading.

The construction explains everything MACD does. When price rallies, the fast 12 EMA pulls away above the slow 26 EMA, so their difference — the MACD line — rises. When the rally slows, the gap stops widening before price stops rising — which is why MACD is often described as measuring the trend's acceleration rather than the trend itself. The standard settings (12, 26, 9) date back to the indicator's creator, Gerald Appel, and are so universal that changing them mostly just means watching a different line than everyone else.

Entry Conditions

PriceBUYSELL0MACDMACD lineSignal line
Entry conditions: BUY when the MACD line crosses above the Signal line — SELL when the MACD line crosses below the Signal line
  • Bullish crossover (BUY) — the MACD line crosses above the Signal line, suggesting upward momentum is taking over.
  • Bearish crossover (SELL) — the MACD line crosses below the Signal line, suggesting downward momentum is taking over.
  • Zero-line cross — when the MACD line crosses above 0 it confirms the short-term average has moved above the long-term average (broader bullish shift), and vice versa below 0.

The two cross types work at different scales, and combining them is the classic refinement: the zero line defines the regime, the signal-line cross times the entry. A bullish crossover that happens below zero but rising toward it is often a trend just being born; one far above zero is a late signal in an old move. Many traders only take bullish crossovers when MACD is above (or crossing) zero and bearish ones below it — trading with the regime rather than against it.

Reading the Histogram

The histogram is the most immediate part of the display and rewards attention on its own:

  • Bars growing — the move is accelerating.
  • Bars shrinking while price still runs — momentum is quietly leaving the move; the histogram peaks before the MACD lines cross, making it the earliest (and noisiest) signal in the stack.
  • Bars flipping sign — that's the crossover itself, seen from a different angle.

MACD Divergence

Like RSI, MACD is a standard tool for spotting divergence: price makes a higher high but the MACD peaks are stepping down (bearish divergence), or price makes a lower low while MACD troughs rise (bullish divergence). Because MACD is built from smoothed averages, its divergences tend to be slower to appear but somewhat less noisy than an oscillator's. The same discipline applies — divergence is a warning that momentum is fading, not a standalone entry, and it needs confirmation from a crossover or a break of price structure.

A Word of Caution

Like any moving-average-based indicator, MACD is a lagging indicator — the crossover confirms a move that has already partly happened. In choppy, sideways markets it can generate frequent false crossovers: with no real trend, the MACD line hovers near zero and weaves across the signal line repeatedly, each cross firing just before the next reversal. Practical filters:

  • Only take MACD signals in the direction of the higher-timeframe trend — e.g. bullish crossovers on H1 only while the daily chart is rising.
  • Check the market state first with ADX or simple swing structure (see Trend vs Range) — in a confirmed range, MACD crossovers near zero are mostly noise.
  • Note that MACD has no fixed scale — unlike RSI's 0-100, its values depend on the pair and timeframe, so there's no universal "overbought" MACD level; only its shape and crosses carry meaning.

MACD also pairs naturally with a Moving Average on the price chart itself: the MA shows the trend's location (is price above or below?), MACD shows its health (is momentum building or fading?).

Download the Indicator

This custom indicator plots the MACD line and Signal line, with automatic alerts when a bullish or bearish crossover occurs. It's available for both MetaTrader 4 and MetaTrader 5 below.

How to Install — MetaTrader 4

  1. Download the macd-cross-alert.mq4 file below.
  2. Open MetaTrader 4 → click FileOpen Data Folder.
  3. Place the file in the MQL4/Indicators folder.
  4. Restart MetaTrader 4, then drag the indicator from the Navigator window onto the chart.

How to Install — MetaTrader 5

  1. Download the macd-cross-alert.mq5 file below.
  2. Open MetaTrader 5 → click FileOpen Data Folder.
  3. Place the file in the MQL5/Indicators folder.
  4. Restart MetaTrader 5, then drag the indicator from the Navigator window onto the chart.

Both files are source code — open and review the full code before using it, for your own safety.

Download macd-cross-alert.mq4

For MetaTrader 4 — this is source code (.mq4), open and review it fully before using it.

Download File

Download macd-cross-alert.mq5

For MetaTrader 5 — this is source code (.mq5), open and review it fully before using it.

Download File