Skip to content

Explore Standard, Pro and ECN trading accounts designed for different trading styles.

Compare accounts
Indicatorsintermediate

MACD Explained

How the MACD indicator is built from exponential moving averages, what its line, signal and histogram show, and how to avoid its most common false signals.

Author
JDGlobalFX Research
Published
Updated
Updated
Reading time
6 min read

MACD, short for Moving Average Convergence Divergence, is an indicator that measures the relationship between two exponential moving averages of price. Developed by Gerald Appel in the late 1970s, it shows whether the short-term trend is accelerating away from or converging toward the longer-term trend, which makes it both a trend and a momentum tool. Because it is built entirely from moving averages, it inherits their strengths in trending markets and their weakness in sideways ones.

What MACD measures

MACD measures the distance between a fast EMA and a slow EMA. When the fast average pulls away above the slow one, recent prices are rising faster than the longer-term average, and MACD is positive and rising. When the fast average falls below the slow one, MACD turns negative. The indicator therefore captures two things at once: which direction the trend is in (sign of the MACD line) and whether that trend is gaining or losing momentum (slope of the line and size of the histogram).

How MACD is calculated

The indicator has three components, all derived from closing prices. With the standard settings of 12, 26 and 9:

  1. MACD line = 12-period EMA − 26-period EMA
  2. Signal line = 9-period EMA of the MACD line
  3. Histogram = MACD line − signal line

The MACD line oscillates around a zero line. It is above zero when the 12 EMA is above the 26 EMA and below zero when the reverse is true. The signal line smooths the MACD line, and crossovers between them are the indicator's primary signal. The histogram makes those crossovers visible as bars that shrink toward zero before a crossover and grow after it.

A concrete illustration: if the 12 EMA of EUR/USD is 1.0870 and the 26 EMA is 1.0850, the MACD line reads +0.0020, or 20 pips. If the 9-period EMA of recent MACD values is +0.0012, the histogram is +0.0008. The MACD line is above its signal, momentum is bullish, and the growing histogram suggests the two EMAs are still diverging.

Because MACD is expressed in price units rather than on a fixed scale, its values are not comparable across different pairs or time frames. A reading of 0.0020 on EUR/USD means something quite different from 0.20 on USD/JPY.

Common settings

ParameterDefaultNotes
Fast EMA12Shorter (e.g., 8) increases sensitivity
Slow EMA26Shorter (e.g., 17) increases sensitivity
Signal EMA9Smooths the MACD line; shorter values produce earlier but noisier crossovers

The 12/26/9 defaults were designed for daily stock charts and remain standard across platforms, including the JDGlobalFX terminal. Some traders use 5/35/5 for faster response or 19/39/9 for smoother weekly analysis, but any change should be tested rather than assumed to be better. Note that some platforms' built-in MACD plots the MACD line as a histogram and the signal line as a line by default, which differs visually from the three-component layout common elsewhere; the underlying values are the same.

Common interpretations

Signal-line crossovers

The most common signal. When the MACD line crosses above the signal line, short-term momentum has turned up relative to its recent average; a cross below indicates the opposite. Crossovers that occur far from the zero line, after an extended move, are often reversals of a mature trend and can be significant. Crossovers that occur close to zero in a ranging market are frequent and unreliable.

Zero-line crossovers

When the MACD line crosses above zero, the 12 EMA has moved above the 26 EMA, which is equivalent to a moving-average crossover. This is a slower, more confirmed signal of trend change. Traders who use MACD primarily as a trend filter may only take long trades when MACD is above zero and short trades when it is below.

Histogram analysis

The histogram shows the gap between the MACD line and the signal line. Shrinking bars indicate that momentum is decelerating even if the trend continues, and often precede a signal-line crossover by a few candles. Some traders treat the first histogram bar that is smaller than the previous one as an early warning of a pullback.

Divergence

As with RSI, divergence occurs when price makes a new extreme that the indicator does not confirm. Bearish divergence is a higher high in price with a lower high on the MACD line; bullish divergence is a lower low in price with a higher low on MACD. It suggests the trend is losing force, but it is a warning rather than a trigger and can persist through several swings.

A worked example

Suppose GBP/USD has been in a 4-hour downtrend with MACD below zero. Price then rallies and the MACD line crosses above zero, indicating the 12 EMA has moved above the 26 EMA. Price pulls back to a previous resistance zone near 1.2700 that may now act as support. During the pullback, the histogram contracts but the MACD line remains above zero. A bullish engulfing candle closes at 1.2725 as the histogram turns positive again.

A trader enters long at 1.2730 with a stop below the pullback low at 1.2670 (60 pips) and a target at the next 4-hour resistance at 1.2850 (120 pips), a 2:1 ratio. MACD supplied the trend context and the momentum confirmation; the level and the candle supplied the entry and the stop. Sizing that 60-pip stop correctly is a separate step handled with the position size calculator.

Limitations and false signals

MACD has clear limitations, most of which stem from being built from lagging averages.

Lag. Signal-line crossovers occur after price has already moved. On volatile pairs, a significant portion of a swing can be over by the time MACD confirms it.

Whipsaws in ranges. In sideways markets, the EMAs stay close together, the MACD line oscillates around zero, and signal-line crossovers occur repeatedly with little follow-through. A crossover strategy applied blindly in a range loses steadily on spread and small losses. Identifying whether the market is trending or ranging, using structure as described in Market Structure Explained, should come before consulting MACD.

No overbought or oversold levels. Unlike RSI, MACD is unbounded. A large positive value indicates strong momentum but does not by itself indicate that a reversal is near.

Redundancy with moving averages. Plotting MACD alongside a 12 and 26 EMA crossover adds no information; the two are mathematically the same signal presented differently.

Divergence ambiguity. Divergences are easy to identify in hindsight and harder in real time, because the "high" being compared may not be complete when the pattern first appears.

MACD is most useful as a momentum confirmation within a framework that already defines trend and location by other means. Pairing it with a bounded oscillator such as RSI or a volatility measure such as Bollinger Bands provides different kinds of information; pairing it with another moving-average indicator does not.

Key takeaways

  • MACD is the difference between a 12-period and a 26-period EMA, with a 9-period EMA of that difference as the signal line and the gap between them shown as a histogram.
  • The MACD line's sign indicates trend (which EMA is on top); its slope and the histogram indicate momentum.
  • Primary signals are signal-line crossovers, zero-line crossovers, histogram contraction and divergence, each with different lag and reliability.
  • MACD values are in price units and are not comparable across pairs or time frames, and there are no fixed overbought or oversold levels.
  • The indicator lags and whipsaws in ranges; use it to confirm momentum within a trend defined by structure, not as a standalone entry system.

Frequently asked questions

Educational content — not financial advice

This article is provided for general educational purposes only and does not constitute investment advice, a recommendation or an offer to trade any financial instrument. It does not take into account your objectives, financial situation or needs. Trading leveraged products involves significant risk of loss. Consider seeking independent advice before making any trading decision.

  • #macd
  • #indicators
  • #momentum
  • #trend
  • #technical analysis

JDGlobalFX

Ready to trade global markets?

Open a JDGlobalFX account and access a professional trading environment with flexible account options and modern platforms.

Risk disclosure

Forex and CFDs are complex, leveraged instruments and carry a high risk of losing money rapidly. Past performance is not a reliable indicator of future results. Before trading, you should consider your investment objectives, level of experience and risk appetite, and only trade with capital you can afford to lose. Nothing on this website constitutes investment advice or a recommendation to trade. This website is not directed at residents of any jurisdiction where such distribution or use would be contrary to local law or regulation. Read the full risk disclosure.

Search

Search markets, accounts, tools, education and FAQs