MACDRSI
Technical Analysis

Understanding the MACD Indicator

A complete guide to the Moving Average Convergence Divergence, one of the most widely used momentum indicators in technical analysis.

What Is MACD?

MACD stands for Moving Average Convergence Divergence. It is a trend-following momentum indicator that shows the relationship between two exponential moving averages (EMAs) of an asset's price. Traders use it to identify the direction and strength of a trend, confirm momentum shifts, and spot potential reversals.

Unlike oscillators that are bounded between fixed values (like the RSI, which moves between 0 and 100), MACD is unbounded. It can move freely above and below a zero line, which makes it especially useful for visualising how momentum builds and fades over time.

A Brief History

The MACD was developed by Gerald Appel in the late 1970s as a simple way to track the interaction between two moving averages. Several years later, in 1986, Thomas Aspray added the histogram component, which made it easier to anticipate crossovers between the MACD line and the signal line. The histogram remains one of the most popular features of the indicator today.

The Three Components

MACD has three pieces that work together. Understanding each one is the key to reading the indicator correctly.

1. The MACD Line

The MACD line is the difference between a fast EMA and a slow EMA of price. The default settings use a 12-period EMA (fast) and a 26-period EMA (slow):

MACD Line = EMA(12) − EMA(26)

When the fast EMA is above the slow EMA, the MACD line is positive: momentum is bullish. When the fast EMA falls below the slow EMA, the MACD line turns negative: momentum is bearish. The further the line moves from zero, the stronger the momentum.

2. The Signal Line

The signal line is a smoothed version of the MACD line, usually a 9-period EMA of the MACD line itself:

Signal Line = EMA(9) of MACD Line

Because it lags the MACD line slightly, the signal line is used as a trigger for entries and exits. When the MACD line crosses above or below the signal line, it suggests momentum is shifting.

3. The Histogram

The histogram visualises the gap between the MACD line and the signal line as vertical bars:

Histogram = MACD Line − Signal Line

When the MACD line is above the signal line, the histogram is positive (bars above zero). When the MACD line is below the signal line, the histogram is negative (bars below zero). Growing bars mean momentum is accelerating; shrinking bars mean momentum is fading, which is often the earliest warning of a coming crossover.

How to Read MACD: The Three Main Signals

1. Signal Line Crossovers

This is the most common MACD signal. A bullish crossover happens when the MACD line crosses above the signal line: momentum is turning up. A bearish crossover happens when the MACD line crosses below the signal line: momentum is turning down.

Crossovers are most reliable when they align with the larger trend. A bullish crossover during a strong uptrend is a much stronger signal than one in a sideways or choppy market, where false signals are common.

2. Centerline (Zero Line) Crossovers

When the MACD line itself crosses the zero line, it confirms a deeper shift in trend direction. A move from below zero to above zero is a bullish confirmation: the fast EMA has crossed above the slow EMA. A move from above to below zero is a bearish confirmation.

Zero-line crossovers tend to come later than signal-line crossovers, but they carry more weight because they reflect a structural change in the moving averages themselves.

3. Divergences

Divergences are among the most watched MACD signals, and also the most subjective. A divergence occurs when price action and the MACD disagree.

A bullish divergence forms when price makes a lower low but the MACD makes a higher low. It suggests that the downward momentum is weakening, and a reversal upward may be near.

A bearish divergence forms when price makes a higher high but the MACD makes a lower high. It suggests that the rally is losing steam and a downward reversal may follow.

Divergences should always be confirmed by other signals (a crossover, a break of support/resistance, or volume confirmation) before acting on them.

Default Settings and How to Adjust Them

The standard MACD configuration is written as (12, 26, 9):

  • Fast Length (12): the period of the fast EMA.
  • Slow Length (26): the period of the slow EMA.
  • Signal Length (9): the period of the signal-line EMA applied to the MACD line.

Shorter values (for example, 5/13/5) make MACD more reactive, which suits scalping and short-timeframe trading, but more prone to false signals. Longer values (for example, 19/39/9) smooth out the noise and are better suited to swing trading and higher timeframes. Most charting platforms use 12/26/9 as the default, so it is the setting most traders see.

You can also change the underlying moving-average type from EMA to SMA, change the source (close, open, hl2, hlc3, etc.), and apply the indicator across any timeframe.

Strengths and Limitations

MACD is popular because it combines trend and momentum into a single, easy-to-read tool. It works well in trending markets, and its histogram makes it easy to see momentum speeding up or slowing down.

However, MACD has clear weaknesses. Because it is built from moving averages, it lags price action: signals always arrive after the move has begun. In ranging or choppy markets, it generates frequent false crossovers. Divergences, while useful, can persist for a long time before price actually reverses.

The best results come from using MACD as part of a confluence rather than in isolation. Combine it with support and resistance, trend structure, volume, and other indicators like the RSI to filter out weaker setups.

Quick Recap

  • MACD measures the difference between a fast and slow EMA. It shows trend direction and momentum.
  • The default settings are 12, 26, 9.
  • The three components are the MACD line, the signal line, and the histogram.
  • The three main signals are signal-line crossovers, zero-line crossovers, and divergences.
  • MACD lags price action and works best in trending markets. Always combine it with other tools for confirmation.

Further reading: TradingView's official MACD reference →

Related lessons

All lessons →

This lesson is education, not financial advice. Trading carries risk and you can lose money.