Skip to content
Technical Analysis

MACD

Two moving averages, a signal line and a histogram — what each component adds, and why crossovers alone are not a strategy.

Technical AnalysisIntermediate10 min read
Browse Technical Analysis(172)

MACD stands for Moving Average Convergence Divergence, which sounds far more sophisticated than it is. It is the gap between a fast moving average and a slow one. That gap widens when momentum accelerates and narrows when it fades.

MACD line = EMA(12) − EMA(26) Signal line = EMA(9) of the MACD line Histogram = MACD − Signal
MACD line
How far the fast average has pulled away from the slow one
Signal line
A smoothed version of the MACD line, used as the trigger
Histogram
The gap between them — this is what turns first
Loading interactive demo…

The three signals it produces

SignalWhat it meansReliability
Signal line crossoverMACD crosses above or below its own 9-period averageThe classic signal. Late, and whipsaws badly in ranges.
Zero line crossoverMACD crosses zero — the 12 EMA crosses the 26 EMASlower still, but a cleaner statement of trend change.
Histogram turnThe bars stop growing and start shrinkingThe earliest warning, and the noisiest. Momentum is decelerating.

Where MACD earns its place

MACD is a trend-following momentum indicator. It performs well when there is a trend to follow and badly otherwise — which is not a flaw, it is the definition of what it does.

MACD works well when
  • The market is trending, with a rising or falling ADX.
  • You use it on daily or weekly charts, not on 5-minute charts.
  • You use zero-line position for direction and crossovers only in that direction.
  • You accept being late in exchange for staying in a big move.
MACD fails when
  • The market is ranging — crossovers fire constantly and lose every time.
  • You take every crossover regardless of context.
  • You use it on a low timeframe where noise dominates.
  • You expect it to call tops and bottoms. It is structurally incapable of that.

The one filter that fixes most of it

Divergence, again

MACD divergence works the same way as RSI divergence and carries the same caveat. Price making a higher high while MACD makes a lower high means the second push had less force behind it. It is a reason to manage risk. It is not a reason to short a trending market.

Check yourself

MACD crosses above its signal line, but both lines are well below zero and the 200-DMA is falling. How should you weight this signal?

Simple bhasha mein
Accelerator dheere hua

Gaadi abhi bhi aage badh rahi hai, par aapne paav accelerator se halka kar liya — speed toh hai, par badhna kam ho gaya. MACD yahi pakadta hai: rafter abhi upar hai par zor kam pad raha hai. Isiliye woh top pe nahi, top se thoda pehle ishaara deta hai.

What to remember
  • MACD is simply the gap between a fast and a slow EMA.
  • The histogram turns first and is the most useful early warning.
  • It is a trend-following tool and will whipsaw in ranges by design.
  • Filter crossovers by zero-line position to remove most bad signals.
  • MACD is measured in rupees, so its values cannot be compared across stocks.
You reached the endMark it done and keep your streak going.
Up nextBollinger Bands and measuring volatilityPrevious: RSI — relative strength index
Finished this lesson?

Mark it done to track your progress through the curriculum.

Common questions

Short, direct answers to what people ask about this topic.

macd full form and what it measures
MACD stands for Moving Average Convergence Divergence, and what it actually measures is the gap between a fast exponential moving average and a slow one. The gap widens when momentum is accelerating and narrows when it fades. Despite the elaborate name there is nothing in it beyond the distance between two EMAs, plotted with a smoothed signal line and a histogram of the difference between the two.
the macd line is calculated as the difference between
The 12-period EMA and the 26-period EMA — MACD line = EMA(12) − EMA(26). The signal line is then a 9-period EMA of that MACD line, and the histogram plots the MACD line minus the signal line. Those three numbers, 12, 26 and 9, are the defaults on essentially every Indian broker terminal and charting platform.
macd histogram meaning
The MACD histogram is the gap between the MACD line and its signal line, drawn as bars. It turns before either crossover occurs, so shrinking bars while price is still rising mean the move is decelerating — still going forward, but with the foot off the accelerator. It is the earliest of MACD’s three signals and correspondingly the noisiest.
why does macd whipsaw in a sideways market
Because MACD is a trend-following momentum tool and in a range there is no trend for it to follow. As price oscillates the fast and slow EMAs keep crossing each other, so signal-line crossovers fire repeatedly and most of them reverse almost immediately. This is a description of what the indicator does rather than a defect: it performs when there is a trend and badly when there is not.
can I compare macd values across different stocks
No — MACD is calculated in rupees rather than percentages, so its value scales with the share price. A MACD of 15 is a small move on a ₹3,000 stock and an enormous one on a ₹200 stock. Screening a universe for something like “MACD above 15” therefore compares numbers that mean completely different things in each name.