Momentum · Indicator

Moving Average Convergence Divergence MACD

MACD tracks the gap between a fast and a slow EMA, with a signal line and a histogram that show momentum building or fading.

Open in chart

Overview

Moving Average Convergence Divergence, created by Gerald Appel, turns the relationship between two exponential moving averages into an oscillator. The MACD line is the fast EMA minus the slow EMA, the signal line is an EMA of the MACD line, and the histogram is the MACD line minus the signal. Crossovers and divergences signal momentum shifts, and the three components together give both a direction and a rate of change.

The core idea is that the distance between two averages measures momentum. When a fast average pulls away from a slow one, price is accelerating in that direction; when the two converge, the move is losing force even if price is still advancing. Plotting that distance as a line makes acceleration visible in a way that watching two averages on the price chart does not.

The histogram adds a second derivative. Because it measures the gap between the MACD line and its own average, it turns before the MACD line crosses the signal, and it turns well before the underlying averages cross on the price chart. That gives an earlier but noisier read, which is why the histogram is watched for momentum shifts and the crossovers for confirmation.

How it is calculated

Two exponential moving averages of the source are computed, one over the fast length and one over the slow. Their difference is the MACD line, which oscillates around zero: positive when the fast average is above the slow one, negative when below.

An exponential average of the MACD line gives the signal line, and subtracting the signal from the MACD gives the histogram. Because it is a difference of two price averages, MACD is quoted in the instrument's own price units and is not bounded, so its values cannot be compared between instruments or across large price changes in the same instrument.

MACD line = EMA(source, Fast) - EMA(source, Slow)
Signal line = EMA(MACD line, Signal)
Histogram = MACD line - Signal line

Inputs

Fast length
Length of the faster exponential moving average, default 12. Reducing it makes the MACD line more responsive and noisier.
Slow length
Length of the slower exponential moving average, default 26. The gap between fast and slow determines the sensitivity of the whole indicator; a wider gap produces larger, slower swings.
Signal length
Length of the exponential average applied to the MACD line, default 9. Shorter values produce earlier crossovers with more false ones; longer values produce fewer, later crossovers.
Source
Which price from each bar feeds both averages: close, open, high, low, hl2, hlc3, ohlc4 or hlcc4. Default close.

How to read it

Position relative to zero is the trend read. MACD above zero means the fast average is above the slow one, which is the standard definition of an uptrend on that pair of lengths. Crossing zero is a slower, more significant event than crossing the signal line.

The signal-line crossover is the momentum read. MACD crossing above its signal says the gap between the averages is widening faster than its own recent average, which is an acceleration. Crossovers that occur well away from zero in the direction of the prevailing trend are generally treated as continuation signals; those occurring near zero in a flat market are usually noise.

The histogram shows the crossover coming. Bars shrinking towards zero while still positive mean upward momentum is fading even though the MACD line is still above its signal. Traders use this as an early warning and the crossover itself as the confirmation.

Divergence is read the same way as on RSI: a new price high with a lower MACD peak says the second advance had less momentum behind it. Because MACD is unbounded, comparing peak heights across long periods is only meaningful when price levels have not changed dramatically.

Signals to look for

Signal line crossover

The MACD line crossing above or below its signal line is the most-watched MACD event, marking a shift in short-term momentum. It generates frequent false signals when the two lines are entangled near zero.

Zero-line cross

MACD crossing zero corresponds exactly to the fast and slow averages crossing on the price chart, which is a slower and more substantial trend signal than the signal-line cross.

Histogram reversal

The histogram peaking and beginning to contract while still on the same side of zero is watched as momentum topping out ahead of the crossover, at the cost of more false readings.

Divergence

Price making a new extreme while the MACD line or histogram makes a less extreme peak indicates the move is being driven by weakening momentum. It describes trend quality rather than timing a turn.

Limitations

Frequently asked questions

What is Moving Average Convergence Divergence (MACD)?

MACD tracks the gap between a fast and a slow EMA, with a signal line and a histogram that show momentum building or fading.

How do you read MACD on a chart?

Position relative to zero is the trend read. MACD above zero means the fast average is above the slow one, which is the standard definition of an uptrend on that pair of lengths. Crossing zero is a slower, more significant event than crossing the signal line.

What signals do traders look for with MACD?

Signal line crossover: The MACD line crossing above or below its signal line is the most-watched MACD event, marking a shift in short-term momentum. It generates frequent false signals when the two lines are entangled near zero.

What are the limitations of MACD?

MACD is built from two lagging averages and then smoothed again, so every signal arrives after the move it describes has begun. On slow settings the crossover can come well into a trend.

Related indicators

Moving AverageRelative Strength IndexRate of ChangeAverage Directional Index

Open in chart Start free trial All indicators