Skip to content
FX Handbook
Technical Analysis

MACD Indicator Explained: MACD Line, Signal Line and Histogram

beginner3 min readBy FX Handbook Editorial TeamUpdated

MACD (Moving Average Convergence Divergence) is a momentum indicator developed by Gerald Appel in the late 1970s. The MACD line is the 12-period EMA minus the 26-period EMA; the signal line is a 9-period EMA of the MACD line; the histogram is the gap between the two. Crossovers and moves across zero describe changes in momentum after they happen, so MACD lags price.

Key takeaways

  • The MACD line is the 12-period EMA minus the 26-period EMA of the closing price.
  • The signal line is a 9-period EMA of the MACD line; the histogram is the MACD line minus the signal line.
  • MACD above zero means the 12-period EMA is above the 26-period EMA; below zero, the reverse.
  • A crossover of the MACD and signal lines shows that momentum has changed, after the fact; in sideways markets the lines cross back and forth, and crossovers can reverse soon after.
  • MACD is built from moving averages, so it lags price and does not predict the next move.

At a glance

MACD line
12 EMA − 26 EMA
Signal line
9 EMA of MACD
Histogram
MACD − signal
Main limit
Lags the price

What is the MACD indicator?

MACD, short for Moving Average Convergence Divergence, is a momentum indicator developed by Gerald Appel in the late 1970s. It measures the gap between two exponential moving averages of the closing price: when the shorter average pulls away from the longer one, momentum is building; when the two converge, it is fading: moving averages.

MACD is shown in a panel below the price chart, with three parts: the MACD line, the signal line and the histogram.

Two-panel chart: a made-up price that falls and then rises, and below it the MACD line, its 9-period signal line and the histogram of the gap between them around a zero line. The MACD line is below zero during the decline and moves above zero after the price turns up.
The MACD line is the 12-period EMA minus the 26-period EMA; the histogram shows the gap between the MACD and signal lines. Both lag the price. Illustrative data, not market prices.

How is MACD calculated?

MACD (12, 26, 9)

MACD line = 12-period EMA − 26-period EMA · Signal line = 9-period EMA of the MACD line · Histogram = MACD line − signal line

MACD values on EUR/USD (illustrative figures)

Assumptions: on a EUR/USD chart, the 12-period EMA is 1.0862, the 26-period EMA is 1.0850 and the signal line is 0.0008.

  • MACD line = 1.0862 − 1.0850 = 0.0012 (12 pips).
  • Histogram = 0.0012 − 0.0008 = 0.0004: the MACD line is above its signal line.
  • Both values are above zero: the shorter average is above the longer one.

Because MACD is measured in price units, its values depend on the pair: a reading of 0.0012 means 12 pips on EUR/USD, while on USD/JPY, where a pip is 0.01, the same reading would be 0.12 pip. MACD values are therefore compared over time on one chart, not across pairs with different prices.

A MACD calculation in four steps: 12-period EMA 1.0862, 26-period EMA 1.0850, MACD line 0.0012, and with a signal line of 0.0008 the histogram is 0.0004.
On EUR/USD a MACD of 0.0012 is 12 pips; values are not compared across pairs. Illustrative figures.

How to read MACD

  • Above or below zero: above zero, the 12-period EMA is above the 26-period EMA, so recent prices are higher on average than over the longer period. Below zero, the reverse.
  • Signal line crossovers: a cross of the MACD line above the signal line shows that upward momentum has increased; a cross below shows it has weakened.
  • Zero line crossovers: the MACD line crossing zero is the same event as the 12 and 26-period EMAs crossing each other.
  • Histogram: bars growing away from zero show the gap between MACD and signal widening; bars shrinking towards zero show it narrowing.
  • Divergence: price makes a new high while MACD makes a lower high (bearish divergence), or price makes a new low while MACD makes a higher low (bullish divergence). It shows slowing momentum, not a turn; trends can continue through divergences.
Sketch of bearish divergence: price makes a higher second high while MACD makes a lower second high, showing slowing upward momentum.
Bearish divergence: momentum is slowing while price still makes new highs. It does not say when or whether price will turn; trends can continue through divergences. Bullish divergence is the mirror image at lows. Sketch.

MACD settings

The typical settings are 12, 26 and 9, and they are the default in charting tools such as StockCharts. Shorter settings react faster and cross more often; longer ones are smoother and cross less. No setting is best in general; whatever is chosen should be tested on past data and on a demo account first: forex demo account.

MACD vs RSI

MACD RSI
What it measures Gap between two EMAs Average gains vs average losses
Scale Unbounded, in price units 0 to 100
Fixed levels Zero line 70 and 30 by convention
Lag Built from moving averages, so it lags Also based on past closes

More on RSI: RSI indicator.

Limits of MACD

  • Lag: MACD is built from moving averages, so crossovers come after the price has already turned.
  • Sideways markets: when price moves in a range, the MACD and signal lines cross back and forth.
  • Research: a 2007 review in the Journal of Economic Literature found technical analysis widespread in currency markets and reported that it “may be profitable”; that does not show that a MACD rule works for a retail trader after costs.

If used, MACD belongs inside a written plan with a stop and position size set before entry, for example alongside support and resistance: trading plan, stop loss.

Free email course

Forex Risk Management in 5 Days

A free five-day email course: risk per trade, stop losses, position sizing, risk-reward and drawdowns, with a worked example each day.

Frequently asked questions

What is the MACD indicator?

Moving Average Convergence Divergence, a momentum indicator developed by Gerald Appel in the late 1970s. It shows the gap between a 12-period and a 26-period exponential moving average, with a 9-period signal line and a histogram.

How is MACD calculated?

MACD line = 12-period EMA − 26-period EMA. Signal line = 9-period EMA of the MACD line. Histogram = MACD line − signal line. With a 12-period EMA of 1.0862 and a 26-period EMA of 1.0850, the MACD line is 0.0012.

What does it mean when MACD crosses the signal line?

That the gap between the short and long averages has started to narrow or widen in the other direction. A cross above the signal line shows upward momentum has increased; a cross below shows it has weakened. It describes what has already happened.

What does MACD above zero mean?

That the 12-period EMA is above the 26-period EMA, so recent prices are higher on average than over the longer period. Below zero means the reverse. It is a description of the trend so far, not a forecast.

What are the best MACD settings?

12, 26 and 9 are the typical settings and the default in charting tools such as StockCharts. Shorter settings react faster and give more crossovers; longer ones are smoother. No setting is best in general; test any change before using it with real money.

What is MACD divergence?

When price makes a new high but MACD makes a lower high (bearish divergence), or price makes a new low but MACD a higher low (bullish divergence). It shows that momentum is slowing; a trend can continue despite it.

Sources

Regulatory and official sources

  1. The Obstinate Passion of Foreign Exchange Professionals: Technical Analysis (Journal of Economic Literature, 2007), American Economic Association

Industry and news sources

  1. MACD (Moving Average Convergence/Divergence Oscillator), StockCharts ChartSchool

Glossary terms

First published 18 October 2026. Last fact-checked 18 October 2026.This article is for educational purposes only and is not investment advice.