MomentumLagging trend-momentum indicatorMACD

Moving Average Convergence Divergence MACD

Two moving averages turned into a momentum oscillator with a signal line and histogram.

Quick answer: MACD is a trend-following momentum indicator that plots the difference between a fast and a slow EMA, with a signal line and a histogram, to reveal shifts in trend strength and direction.

In simple words

MACD takes two exponential moving averages — a fast 12-period and a slow 26-period — and subtracts one from the other. When the fast average pulls away above the slow one, momentum is turning up; when it falls below, momentum is turning down. A 9-period signal line smooths the MACD, and the gap between them is drawn as a histogram, so you can see momentum building or fading at a glance. Traders use MACD crossovers, the zero line and the histogram to time entries and gauge trend strength.

Moving Average Convergence Divergence — visual

How Moving Average Convergence Divergence looks on a chart

The MACD line (fast−slow EMA) and its signal line cross to give signals; the histogram shows the gap between them, expanding as momentum builds and shrinking as it fades. Zero marks the trend divide.

303.1-137.5MACDTime (illustrative bars →)MACDSignal
Category
Momentum Indicators
Type
Lagging trend-momentum indicator
Created by
Gerald Appel (late 1970s)
Best timeframe
Daily and 4-hour for swing; 15-min for intraday

Professional explanation

The three parts of MACD

MACD has three components. The MACD line is the 12-EMA minus the 26-EMA. The signal line is a 9-EMA of the MACD line. The histogram is the MACD line minus the signal line. Each answers a different question: the MACD line shows raw momentum, the signal line smooths it to generate crossovers, and the histogram shows the rate at which momentum is accelerating or decelerating.

Three ways to read it

First, signal-line crossovers: MACD crossing above its signal is bullish, below is bearish. Second, the zero line: MACD above zero means the fast EMA is above the slow EMA (an uptrend), below zero a downtrend. Third, divergence: like RSI, MACD diverging from price warns of exhaustion. The histogram is often the earliest tell — it peaks and turns before the crossover happens.

Why it is both trend and momentum

MACD is unusual: it is built from moving averages (a lagging, trend tool) but expressed as an oscillator (a momentum tool). That dual nature is its strength — it keeps you on the right side of the trend via the zero line while timing entries via crossovers. It is also its weakness: because it is EMA-based, it lags, and in a sideways market the crossovers whipsaw.

The histogram as an early warning

Professionals watch the histogram closely. When the histogram bars stop growing and start to shrink, momentum is decelerating even though price may still be rising — an early hint that a crossover is coming. A shrinking histogram into a new price high is the MACD equivalent of bearish divergence and often precedes the actual signal-line cross by several bars.

Formula

Moving Average Convergence Divergence formula

MACD = EMA₁₂(close) − EMA₂₆(close); Signal = EMA₉(MACD); Histogram = MACD − Signal

The classic settings are 12, 26 and 9. All three are exponential moving averages, so recent prices carry more weight.

  • EMA₁₂ — 12-period exponential moving average of closing price (the fast line)
  • EMA₂₆ — 26-period exponential moving average of closing price (the slow line)
  • Signal — 9-period EMA of the MACD line
  • Histogram — MACD line minus the signal line

How it is calculated

  1. Compute the 12-period EMA and the 26-period EMA of closing price.
  2. Subtract the slow (26) EMA from the fast (12) EMA to get the MACD line.
  3. Take a 9-period EMA of the MACD line to get the signal line.
  4. Subtract the signal line from the MACD line to get the histogram.
  5. Plot the MACD line and signal line together, with the histogram as bars around the zero line.

Interpretation & signals

Traders read MACD three ways: the signal-line crossover (momentum trigger), the zero-line position (trend direction), and divergence plus a shrinking histogram (early reversal warning).

Buy / bullish signals

  • MACD line crosses above the signal line (bullish crossover).
  • MACD crosses above the zero line, confirming an uptrend.
  • Bullish divergence: price makes a lower low while MACD makes a higher low.
  • Histogram turns from falling to rising below zero (early momentum shift).

Sell / bearish signals

  • MACD line crosses below the signal line (bearish crossover).
  • MACD crosses below the zero line, confirming a downtrend.
  • Bearish divergence: price makes a higher high while MACD makes a lower high.
  • Histogram peaks and starts shrinking above zero (momentum decelerating).

False signals to beware

  • In a sideways market, MACD crossovers whipsaw repeatedly around the zero line.
  • Crossovers far from zero can be late — the bulk of the move may be over.
  • A single crossover without zero-line agreement often fails.

Settings, timeframe & conditions

Best settings
12, 26, 9 (Appel default)
Avoid
Fast/slow set too close together, producing constant crossovers
Works best in
Trending markets with sustained moves
Struggles in
Tight ranges and low-volatility chop

Advantages & limitations

Advantages

  • Combines trend and momentum in one tool.
  • The histogram gives an early read on momentum before crossovers.
  • Zero line keeps you aligned with the larger trend.
  • Clear, objective crossover signals that are easy to automate.

Limitations & disadvantages

  • Lags because it is built from moving averages.
  • Whipsaws badly in ranging markets.
  • Unbounded scale makes overbought/oversold hard to judge.
  • Values are not comparable across instruments of different price levels (use PPO for that).

Combining Moving Average Convergence Divergence with other indicators

  • Average Directional Index — ADX confirms whether a trend is strong enough to trust MACD crossovers — take crossovers only when ADX is above 20–25.
  • Relative Strength Index — RSI and MACD agreeing on a momentum shift is far stronger than either alone; RSI adds the overbought/oversold context MACD lacks.
  • Exponential Moving Average — A 200-EMA trend filter keeps you taking only the MACD crossovers that align with the primary trend.

Practical examples (Nifty & Bank Nifty)

NIFTY example

Nifty is trending up above its 50-EMA. It pulls back for a few sessions and the MACD histogram shrinks toward zero, then the MACD line curls up and crosses above its signal line while still above zero. That bullish crossover in the direction of the established uptrend, with MACD above zero, is a textbook continuation entry — momentum re-engaging after a pause.

BANKNIFTY example

Bank Nifty makes a new high at 52,300 but the MACD line prints a lower peak than at the previous high — bearish divergence. The histogram, which had been expanding, starts to contract. A few bars later MACD crosses below its signal line, and the divergence-plus-crossover combination warns that the up-move is running out of steam before price confirms with a lower high.

Common mistakes

  • Trading every crossover regardless of the zero line or the larger trend.
  • Using MACD in a range, where crossovers whipsaw.
  • Ignoring the histogram, which often warns before the crossover.
  • Comparing MACD values between a ₹500 stock and Nifty — the scale is price-dependent.

Professional usage

Professionals treat MACD as a trend-momentum filter rather than a standalone system. They favour crossovers that occur on the correct side of the zero line and in the direction of the higher-timeframe trend, and they watch the histogram for early deceleration. In systematic strategies MACD is often one confirming input among several, with ADX or a moving-average filter deciding whether the market is trending enough to act on its signals.

Key takeaway

MACD merges trend and momentum: the zero line tells you the trend, the crossover times the entry, and the histogram warns when momentum is fading. It shines in trends and whipsaws in ranges — so pair it with a trend-strength filter.

Frequently asked questions

What is the MACD indicator?
MACD (Moving Average Convergence Divergence) is a trend-momentum indicator that plots the difference between a 12-period and 26-period EMA, along with a 9-period signal line and a histogram, to show shifts in trend and momentum.
What are the best MACD settings?
The classic settings are 12, 26, 9. Faster settings like 5, 35, 5 are used by some traders, but 12/26/9 remains the standard and works across timeframes.
What is a MACD crossover?
A crossover is when the MACD line crosses its signal line. Crossing above the signal is bullish; crossing below is bearish. Crossovers that agree with the zero line are more reliable.
What does the MACD histogram show?
The histogram is the gap between the MACD line and its signal line. Growing bars mean momentum is accelerating; shrinking bars mean it is decelerating, often before a crossover occurs.
Is MACD a leading or lagging indicator?
MACD is primarily lagging because it is built from moving averages. Its histogram and divergence can give slightly leading hints, but the core crossover signal follows price.
What does the MACD zero line mean?
When MACD is above zero, the fast EMA is above the slow EMA — an uptrend. Below zero is a downtrend. The zero line is a simple trend filter for crossover signals.
What is MACD divergence?
MACD divergence is when price and the MACD line move in opposite directions — a higher price high with a lower MACD high (bearish) or a lower price low with a higher MACD low (bullish) — warning of possible reversal.
Which is better, MACD or RSI?
They do different jobs. MACD is a trend-momentum tool best for crossovers and trend strength; RSI is a bounded oscillator best for overbought/oversold and divergence. Using both together is common.
Does MACD work for intraday trading?
Yes, on 5- to 15-minute charts, but it whipsaws in low-volatility periods. Intraday traders often confirm MACD with a trend filter or volume before acting.
Why does MACD whipsaw?
In sideways markets the fast and slow EMAs stay close together, so the MACD line crosses its signal repeatedly, producing many false signals. A trend-strength filter like ADX reduces these whipsaws.

Voice search & related questions

Natural-language questions people ask about Moving Average Convergence Divergence.

What is MACD in simple terms?
MACD compares a fast and a slow moving average; when the fast one pulls above the slow one momentum is turning up, and when it drops below, momentum is turning down.
Is a MACD crossover a buy signal?
A bullish MACD crossover can be a buy signal, but it is far more reliable when MACD is above the zero line and the crossover aligns with the larger trend.
What is the best timeframe for MACD?
The daily chart suits swing traders and the 15-minute chart suits intraday traders; MACD works on any timeframe but performs best in trending conditions.
What do the MACD bars mean?
The bars are the histogram — the distance between the MACD line and its signal line. Bigger bars mean stronger momentum; shrinking bars mean momentum is fading.

Sources & references

Last reviewed 8 July 2026. Educational content only — not investment advice.

Educational content only — not investment advice. Indicator diagrams are illustrative, computed from a fixed synthetic price series. Trading involves substantial risk. See our Risk Disclosure and SEBI Disclaimer.