Learn the measurements

MACD Explained: Formula, Signal Line, Histogram and Crossovers

MACD is the 12-day EMA minus the 26-day EMA. Learn the signal line, histogram and crossover conventions, and why MACD is in price units.

Reviewed · Sources at the end · How Vyreon measures
Vyreon's per-security reports are not live yet; this page describes what they will measure. Examples are illustrative.

MACD (Moving Average Convergence Divergence) is the gap between a 12-day and a 26-day exponential moving average of the closing price. It is positive when the faster average is above the slower one and negative when it is below. A signal line and a histogram show whether that gap is widening or narrowing.

MACD Formula

  • MACD line = 12-day EMA − 26-day EMA
  • Signal line = 9-day EMA of the MACD line
  • Histogram = MACD line − signal line

An EMA (exponential moving average) weights recent closes more heavily: EMA today = EMA yesterday + α × (close − EMA yesterday), with α = 2 / (n + 1). See moving averages.

Illustrative example: with a 12-day EMA of 101.50 and a 26-day EMA of 100.00, the MACD line is 1.50. If the signal line is 1.20, the histogram is +0.30.

How To Read MACD

  • Above or below zero: the 12-day average is above (positive) or below (negative) the 26-day average, so recent prices have been running above or below the longer trend.
  • Histogram: the distance between MACD and its own 9-day average. A histogram moving away from zero means the gap between the 12- and 26-day averages is changing faster than it has recently; one moving toward zero means that change is slowing.

MACD Crossover

Two crossovers are conventional reference points:

  • Signal-line crossover: the MACD line crosses its signal line. The histogram changes sign on the same day.
  • Zero-line crossover: the MACD line crosses zero, which happens exactly when the 12-day EMA crosses the 26-day EMA.

Traders also watch divergence, where the price makes a new high or low and MACD does not. All of these are conventions for describing changes in momentum, not rules about what happens next. Because MACD is built from averages of averages, crossovers arrive after the price change that produced them.

How Vyreon Calculates It

  • MACD(12, 26, 9) on daily closes adjusted for splits and dividends, so corporate actions do not create false swings.
  • Each EMA uses α = 2 / (n + 1) and starts from the simple average of its first n values. The signal line starts from the first nine MACD values.
  • Vyreon reports the MACD line, signal line and histogram, plus the 12- and 26-day EMAs.

Because an EMA depends on where it starts, sites that start from a different date can show slightly different values.

What MACD Does Not Tell You

  • MACD is in price units (dollars), not percent. A $500 stock shows a bigger MACD than a $50 stock for the same percentage move, so compare a security's MACD with its own history, not with another security's.
  • It describes recent prices and lags them. It does not forecast.
  • Crossovers and divergences are conventions, not signals that require a move.

Related: moving averages · RSI · ADX · stochastic oscillator · Bollinger Bands

Sources

  • Gerald Appel, who developed MACD in the late 1970s; Technical Analysis: Power Tools for Active Investors (FT Press, 2005).
  • John J. Murphy, Technical Analysis of the Financial Markets (New York Institute of Finance, 1999): MACD, its signal line and conventional readings.

Crossovers and divergences are trading conventions; we know of no peer-reviewed source establishing them as forecasts.