The moving average convergence/divergence, or MACD, is a momentum indicator that turns two exponential moving averages into a single readout of trend strength and direction. Traders use it to see when momentum is building, fading or flipping.
It plots three things on or below your price chart: the MACD line, a signal line and a histogram that shows the gap between the two. Crossovers and moves around the zero line help frame buy or sell bias, while divergences hint at potential reversals.
What MACD actually measures
MACD compares a faster moving average with a slower one, then tracks how the difference between them changes. When the fast average pulls away from the slow one, momentum is increasing. When they converge, momentum is fading. If the fast average sits above the slow one, the short-term trend outruns the longer-term trend, which bullish traders like. The opposite is true when it sits below.
Because it is based on moving averages, MACD is a lagging indicator. It reacts to prices rather than predicting them, though many traders look for early warnings using divergences between price and the indicator.
How MACD is calculated step by step
Standard MACD uses three exponential moving averages, or EMAs. EMAs weight recent prices more heavily than older ones.
- First calculate a 12-period EMA of closing prices and a 26-period EMA of closing prices.
- 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 MACD line minus the signal line. It oscillates around zero and visually shows when momentum is widening or narrowing.
The periods are the default on most chart packages, but they can be changed. Shorter periods make MACD more sensitive and noisier. Longer periods smooth it and slow it down. Some platforms round EMAs slightly differently, so values can vary a little by provider.
Reading the MACD line, signal line and histogram
There are three common reference points.
- Signal line crossovers. When the MACD line crosses above the signal line, it indicates rising upside momentum. Crossing below suggests growing downside momentum.
- Zero line crosses. When the MACD line moves above zero, the fast EMA has risen above the slow EMA. That aligns with a bullish phase. Below zero suggests a bearish phase.
- Histogram behaviour. Expanding histogram bars show the gap between MACD and its signal is widening, which confirms momentum. Shrinking bars signal momentum is cooling and a crossover could be near.
Divergence adds another layer. A bullish divergence appears when price makes a lower low but MACD makes a higher low. That shows selling pressure is weakening. A bearish divergence is the mirror image, with price at a higher high while MACD prints a lower high. Divergences are suggestive, not guarantees, and are stronger when they align with other evidence such as support or resistance.
Common trading signals with simple examples
Here are typical ways traders incorporate MACD into a plan. These are illustrations, not advice.
- Momentum entry. A stock bottoms near 100 after a decline. The MACD line crosses above the signal line while still below zero, then a few sessions later the MACD crosses above zero. Traders might view the first crossover as an early entry and the zero cross as confirmation that the short-term average has overtaken the long-term one.
- Trend continuation. During an uptrend from 50 to 60, the histogram dips towards zero as price pulls back, then turns higher again before the MACD actually crosses below the signal line. The renewed expansion of the histogram can be read as momentum resuming in the trend direction.
- Divergence watch. Price pushes from 108 to a marginal new high at 110, but the MACD peaks lower than on the prior high. That bearish divergence warns that the rally may be tiring, so a trader tightens stops or waits for a signal-line crossover down before taking a short.
Signals tend to be more reliable in trending environments and prone to whipsaws in choppy ranges. Many traders add a filter, such as only taking bullish crossovers when the MACD is above zero and price is above a longer moving average.
Settings, timeframes and variations
The classic 12, 26, 9 set-up was popularised for daily charts, but MACD works on hourly, 15-minute or weekly charts as well. Shorter timeframes respond faster and deliver more false moves. Longer timeframes reduce noise but lag more.
Variations include:
- Alternative periods. For very short-term trading, some use 5, 13, 6 to make the indicator snappier. For position trading, 19, 39, 9 is a common slower option.
- Different price inputs. Most calculations use closing prices. A few packages allow typical price or weighted close. Results will differ slightly.
- Visual style. MACD can be plotted under standard candlesticks or smoothed candles such as Heikin Ashi. The indicator logic is unchanged, though smoothing on the main chart can affect how you perceive timing.
There is also a relative version called Percentage Price Oscillator, or PPO, which expresses the difference between EMAs as a percentage rather than an absolute value. PPO is useful for comparing momentum across assets with very different prices.
Strengths, limits and common mistakes
Strengths. MACD is simple, versatile and self-contained. It blends trend and momentum in one pane, which helps with timing entries and exits, and it adapts across markets, including equities, crypto, forex and futures.
Limits. It lags by design and can fire multiple false crossovers in sideways ranges. Divergences can persist for a long time without price turning. Because it measures differences in averages, a massive one-off price spike can distort readings for several periods.
Common mistakes. Treating every crossover as a trade without context, ignoring the broader trend, and over-optimising the periods to fit historical data. Many traders pair MACD with a separate tool that excels in range conditions, such as RSI, or use simple structure filters like support and resistance to cut down noise. Position sizing and risk controls matter because indicator signals can fail.
Where you will see MACD in practice
MACD is built into almost every charting package. You will find it on platforms such as MetaTrader, web charting tools and broker mobile apps. The exact defaults, colours and scaling can vary by provider, but the components are the same: MACD line, signal line and histogram.
In day-to-day use, traders overlay MACD on a price chart and watch for crossovers near key levels. Portfolio managers might scan for weekly zero-line crosses to identify shifts in medium-term momentum. In fast markets, the histogram often provides the earliest visual cue that momentum is changing, even before a formal crossover prints.
All of this sits on top of raw price data, so clean and timely quotes matter. On thinly traded assets or during off-hours sessions, gaps and erratic ticks can skew EMAs and produce jumpy signals.
Used thoughtfully, MACD helps organise what price is already saying about trend and momentum. It will not replace a plan, but it can anchor one.