MACD is one of the most widely used tools in technical analysis. It helps traders see if momentum, the strength and speed of a stock’s price movement, behind a stock's price move is picking up or fading. The indicator uses two exponential moving averages, a signal line, and a histogram.
Learn how MACD works, what its different signals mean, and where traders need to be careful in this article.
Key Takeaways
- Compares a 12-period EMA with a 26-period EMA to measure momentum.
- A 9-period EMA of the MACD line generates trading crossovers.
- Visualizes the gap between the MACD line and the signal line.
- Traders watch for crossovers, zero-line breaks, histogram shifts, and divergence.
- Because it relies on historical price data, MACD can give delayed signals and should be used alongside other analytical tools.
What Is MACD?
MACD is a comparison between two exponential moving averages (EMAs). An EMA places greater weight on recent prices, so it reacts faster to new price movements than a simple moving average.
The standard MACD setup uses three numbers:
- 12-period EMA (fast moving average)
- 26-period EMA (slow moving average)
- 9-period EMA (signal line, calculated from the MACD line itself)
The 12-period and 26-period EMAs are used to calculate the MACD line.
A nine-period EMA is then calculated on the MACD line itself. This produces the signal line.
There is also a third part of the indicator: the histogram. It shows the difference between the MACD line and the signal line.
So, when a trader looks at a standard MACD chart, there are really three things to keep an eye on: the MACD line, the signal line, and the histogram.
Also Read About: What is Exponential Moving Average?
How is MACD Calculated?
First, the 26-period EMA is subtracted from the 12-period EMA:
MACD Line = 12-period EMA − 26-period EMA
The signal line comes next. It is the 9-period EMA of the MACD line:
Signal Line = 9-period EMA of the MACD Line
Finally, the histogram is calculated by taking the signal line away from the MACD line:
MACD Histogram = MACD Line − Signal Line
You do not need to calculate any of this yourself. Trading platforms do the math automatically and display the results on the chart.
The traditional settings are 12, 26, and nine.
Traders can also adjust these settings depending on the strategy and time frame they use.
The relationship between the two moving averages also determines whether MACD is positive or negative.
If the 12-period EMA is above the 26-period EMA, MACD is positive.
If it falls below the longer-term EMA, MACD becomes negative.
Example:
A stock has:
- 12-period EMA: ₹120
- 26-period EMA: ₹115
MACD = ₹120 − ₹115 = ₹5
The positive MACD value of 5 suggests that the shorter-term average is above the longer-term average, indicating positive momentum.
The signal line is typically a 9-period EMA of the MACD line, while the histogram shows the difference between the MACD line and the signal line.
Interpreting the MACD Histogram
The MACD histogram shows the difference between the MACD line and the signal line, helping traders assess changes in momentum.
- Bars above the zero line: The MACD line is above the signal line, indicating positive or bullish momentum.
- Bars below the zero line: The MACD line is below the signal line, indicating negative or bearish momentum.
- Growing bars: Momentum in the current direction may be strengthening.
- Shrinking bars: Momentum may be weakening, which can indicate that a price trend is losing strength.
For example, if positive histogram bars are getting taller, bullish momentum may be increasing. If they start becoming shorter, bullish momentum may be fading.
What Does the MACD Line Tell Traders?
The MACD line indicates the distance between the short- and long-term EMAs.
If the two averages diverge further, MACD moves further from zero.
If they start coming together, MACD moves back towards zero.
A rising MACD can point to improving upward momentum. A falling MACD can suggest that momentum is losing strength or that downward pressure is increasing.
Also Read About: Momentum Indicators
MACD Trading Signals
MACD signals are considered reliable when they align with the prevailing price trend and are supported by changes in trading volume.
1. MACD Crossovers
- Bullish Crossover: Occurs when the MACD line crosses above the signal line, suggesting upward momentum is building.
- Bearish Crossover: Occurs when the MACD line crosses below the signal line, suggesting waning momentum or rising selling pressure.
Note: In sideways or choppy markets, crossovers can generate false signals if traded in isolation.
2. Zero-Line Crossovers
- Above Zero: Indicates that the short-term EMA is above the long-term EMA, supporting a broader bullish bias.
- Below Zero: Indicates that the short-term EMA is below the long-term EMA, supporting a bearish bias.
3. MACD Divergence
Divergence occurs when price action and MACD move in opposite directions, often warning of an impending trend change:
- Bullish Divergence: The stock records a lower low, while the MACD forms a higher low, indicating that selling pressure is fading.
- Bearish Divergence: The stock records a higher high, but MACD forms a lower high, signaling that buying momentum is exhausting.
How To Read MACD On a Stock Chart?
Reading MACD becomes easier when you avoid focusing on one signal at a time.
Start with the stock itself. Is it on an uptrend, a downtrend, or simply moving sideways?
Then check where the MACD is relative to the zero line.
Next, look at the MACD and signal lines. Have they crossed? If so, in which direction?
The histogram should be checked after that. Are its bars getting larger or smaller?
Finally, compare the important highs and lows on the price chart with those on the MACD. This is where possible divergence can show up.
Putting these pieces together gives a clearer picture than simply reacting whenever two lines cross.
Example:
Tata Motors on the National Stock Exchange (NSE) provides a clear real-world illustration of MACD momentum and divergence in action:
Momentum Expansion: During a strong multi-week rally, the MACD line crosses cleanly above the signal line. As buying pressure intensifies, the histogram turns positive and the bars expand rapidly, confirming that bullish momentum is accelerating behind the rising stock price.
Momentum Divergence: Later in the cycle, Tata Motors' stock price ticks up to a fresh high, but the histogram bars visibly shrink. This hidden divergence signals that the underlying buying pressure is fading even as the price edges upward.
The Bearish Crossover: Shortly after the divergence, the MACD line crosses downward below the signal line, providing technical traders with an early warning sign of a trend exhaustion or a coming price correction.
Also Read About: How to Use the MACD Indicator?
Limitations Of MACD
MACD is calculated from historical price data. By the time a signal appears, part of the price move may already have happened.
It can give false signals. This is particularly noticeable when a stock is moving sideways. MACD and its signal line can cross repeatedly without producing a meaningful trend.
It does not look at fundamentals. MACD only works with price-related information. It cannot tell you whether a company is profitable, how much debt it carries, whether its cash flow is healthy, or whether its shares look expensive.
The time frame can change the picture. MACD may look bullish on a weekly chart while appearing bearish on an hourly chart. The signal, therefore, needs to be considered in the context of the time frame used.
MACD divergence can persist for an extended period before a price reversal occurs, and it does not guarantee that a reversal will happen immediately. Traders should avoid relying on divergence alone and consider other indicators and market conditions before making a trading decision.
MACD vs RSI: What Is the Difference?
MACD and RSI are both popular technical indicators, but they answer somewhat different questions.
| Factor | MACD | RSI |
| Main focus | Momentum and trend changes | Recent price strength |
| How it works | Compares two moving averages | Measures recent gains and losses |
| Common use | Identifying changes in momentum | Spotting potentially overbought or oversold conditions |
| Range | No fixed range | 0 to 100 |
| Common overbought level | No fixed level | Above 70 |
| Common oversold level | No fixed level | Below 30 |
| Signal frequency | Lower frequency. Generates fewer signals, making it prone to lagging during rapid, choppy market moves | Higher frequency. Generates more frequent signals due to its fixed-range calculation, which can lead to more false positives in strong trends |
Also Read About: What is Relative Strength Index (RSI)?
Conclusion
MACD gives traders another way to look beneath a stock's price movement. Its traditional calculation compares the 12-period EMA with the 26-period EMA. The difference between the two produces the MACD line. A nine-period EMA of that line creates the signal line, while the histogram shows the gap between MACD and the signal line. From there, traders can study crossovers, the zero line, changes in histogram bars and divergence.
