Skip to main content
Studies · Moving-average oscillators

MACD (Moving Average Convergence Divergence)

macd · Appel's MACD — a fast/slow EMA spread with its signal line

Drawn in its own panelReads one column (close here)Guide lines at 0
Hover the chart to read values · practice data: a seeded random walk with no overnight gaps

What it measures

The gap between a fast and a slow EMA of price (the MACD line), an EMA of that gap (the signal line), and the difference between the two (the histogram). When the fast average pulls away from the slow one, momentum is building in that direction.

How traders use it

  • Signal-line crossovers: MACD crossing above its signal line is a buy signal, below a sell. The histogram crosses zero at exactly those points, which is why it is drawn as bars.
  • Zero-line crossovers: the MACD line crossing zero means the fast EMA has crossed the slow one, a slower trend signal.
  • Divergence: price making a new high while MACD makes a lower high warns that the move is losing momentum.
  • A shrinking histogram shows momentum fading before the lines actually cross.

Parameters

NameValueDefaultAllowedWhat it does
fastPeriod12≥ 1
usual 5–20
The fast EMA. Classic value 12.
slowPeriod26any
usual 20–60
The slow EMA. Classic value 26.
signalPeriod9≥ 1
usual 3–20
EMA of the MACD line used as the signal. Classic value 9.

Outputs

LineMACD line: fast EMA minus slow EMA, in price units.
SignalSignal line: an EMA of the MACD line.
HistHistogram: MACD line minus signal line, drawn as bars.

Drawn in one colour, one line per output, told apart by line texture. Hover the chart to read each one.