MACD Indicator Explained: MACD Line, Signal Line and Histogram
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.
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
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.
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.
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
- The Obstinate Passion of Foreign Exchange Professionals: Technical Analysis (Journal of Economic Literature, 2007), American Economic Association
Industry and news sources
- MACD (Moving Average Convergence/Divergence Oscillator), StockCharts ChartSchool
Related articles
- Moving Averages in Forex: SMA vs EMA, Periods and Crossovers
Moving averages in forex explained: how SMA and EMA are calculated, worked examples, common periods (20, 50, 200), crossovers, golden cross and their limits.
- RSI Indicator Explained: Formula, 70 and 30 Levels, Divergence
The RSI indicator explained: how the Relative Strength Index is calculated step by step, what 70 and 30 mean, the 14-period setting, divergence and its limits.
- Support and Resistance in Forex: How to Find and Use Levels
Support and resistance in forex explained: how to find levels on a chart, why they are zones, breakouts and false breakouts, and placing a stop with an example.
- Forex Trading Plan: How to Write One, With a Template
What a forex trading plan is and how to write one: what it should include, risk rules, a fill-in template, an example plan and how to test and update it.
- Stop Loss in Forex: How to Set One and Where to Place It
How a stop loss works in forex, how to set one step by step, common ways to choose the stop level, and why a stop can close at a worse price.
Glossary terms
- Volatility
Volatility is how much and how quickly a currency pair’s price moves over a period. Higher volatility means larger price swings and, for the same position size, greater risk.
- Stop loss
A stop loss is an order that closes a position automatically if the price moves against you to a set level. It is designed to limit the loss on a trade, but it does not guarantee the exit price.
First published 18 October 2026. Last fact-checked 18 October 2026.This article is for educational purposes only and is not investment advice.