Get pinged when your stocks flip

We'll only notify you about YOUR stocks — when the trend flips, hits stop loss, or hits a target. Never spam.

Install TrustyBull on iPhone

  1. Tap the Share button at the bottom of Safari (the square with an up arrow).
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add in the top-right.

How Does MACD Work in Technical Analysis?

MACD works by showing the relationship between two exponential moving averages of a security's price. Traders use its three components—the MACD line, the signal line, and the histogram—to spot potential buy and sell signals based on market momentum.

TrustyBull Editorial 5 min read

How Does the MACD Indicator Work?

MACD, or Moving Average Convergence Divergence, works by showing the relationship between two moving averages of a security's price. Many consider it one of the best technical indicators for trading in India because it helps traders understand momentum, its direction, and its strength. Essentially, it subtracts a longer-term exponential moving average (EMA) from a shorter-term EMA, giving you a clear picture of how price trends are changing.

Think of it like two runners in a race. If the faster runner (short-term EMA) is pulling away from the slower runner (long-term EMA), momentum is strong. If they start getting closer, momentum is fading. The MACD indicator plots this difference, making it easy for you to see these changes on your chart.

The Three Core Components of MACD

To use MACD effectively, you must understand its three parts. Each one tells a different part of the story about the stock's momentum.

  • The MACD Line: This is the heart of the indicator. It's calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA. This line reacts relatively quickly to price changes.
  • The Signal Line: This is a 9-period EMA of the MACD line itself. Because it's an average of the MACD line, it moves more slowly. Its purpose is to smooth out the MACD line and make it easier to spot trading signals.
  • The Histogram: This is the visual representation of the difference between the MACD line and the Signal line. When the MACD line is above the signal line, the histogram is positive (usually shown as green bars). When the MACD line is below the signal line, the histogram is negative (usually shown as red bars). The height of the bars shows how strong the momentum is.

Identifying Trading Signals with MACD

Now that you know the components, how do you use them to make trading decisions? There are two primary signals that traders look for: crossovers and divergence. These signals can help you identify potential entry and exit points in the market.

Signal Line Crossovers

This is the most common way to use the MACD indicator. A crossover happens when the MACD line crosses over or under the Signal line.

  1. Bullish Crossover: This occurs when the MACD line crosses above the Signal line. This suggests that momentum is shifting to the upside and could be a signal to buy. The histogram will flip from negative to positive.
  2. Bearish Crossover: This happens when the MACD line crosses below the Signal line. This indicates that momentum is shifting downwards and might be a signal to sell or short the stock. The histogram will flip from positive to negative.

While simple, crossovers can generate false signals, especially in sideways or choppy markets. That's why many experienced traders use them in combination with other signals.

MACD Divergence: The Powerful Signal

Divergence is a more advanced but incredibly powerful signal. It happens when the price of a stock is moving in one direction, but the MACD indicator is moving in the opposite direction. This suggests the current trend is losing strength and a reversal could be near.

When price makes a new high but the MACD makes a lower high, it's a sign that the upward momentum is fading. This is a classic bearish divergence.

There are two types of divergence:

  • Bearish Divergence: The stock price makes a higher high, but the MACD indicator makes a lower high. This warns that the uptrend might be weakening and a price drop could follow.
  • Bullish Divergence: The stock price makes a lower low, but the MACD indicator makes a higher low. This suggests that the downtrend is losing steam and the price might soon start to rise.

Divergence signals are often more reliable than simple crossovers, but they can be harder to spot for new traders.

Why MACD is a Favourite Indicator for Trading in India

The Indian stock market, including indices like the Nifty 50 and Bank Nifty, is known for its strong trends and occasional volatility. This is where a momentum indicator like MACD shines. It helps traders capture the meat of a move, whether it's a breakout in a top IT stock or a trend reversal in a banking share.

Because it is versatile, it works across different timeframes. A day trader might use it on a 5-minute chart, while a swing trader uses it on a daily chart. This flexibility makes it one of the best technical indicators for trading in India, suitable for various trading styles.

Signal Type What to Look For Potential Action
Bullish Crossover MACD line crosses above Signal line. Histogram turns positive. Consider buying or entering a long position.
Bearish Crossover MACD line crosses below Signal line. Histogram turns negative. Consider selling or entering a short position.
Bullish Divergence Price makes a lower low, but MACD makes a higher low. Look for confirmation of a potential trend reversal to the upside.
Bearish Divergence Price makes a higher high, but MACD makes a lower high. Look for confirmation of a potential trend reversal to the downside.

Limitations of the MACD Indicator

No indicator is perfect, and MACD is no exception. It's important to be aware of its weaknesses to avoid costly mistakes.

First, MACD is a lagging indicator. Because it's based on past price data (moving averages), its signals will always come after the price move has already started. This means you might miss the very beginning of a trend. However, for many traders, this is a good thing as it provides confirmation that a trend is likely underway.

Second, MACD can give false signals in a non-trending, sideways market. When a stock is moving in a tight range, the MACD and Signal lines can cross back and forth frequently, generating confusing buy and sell signals. This is why it’s best to use MACD in trending markets. To confirm its signals, you can use it alongside other indicators like the Relative Strength Index (RSI) to measure overbought or oversold conditions, or with support and resistance levels.

By understanding how it works and respecting its limitations, you can make the MACD a valuable tool in your technical analysis toolkit.

Frequently Asked Questions

What are the three main components of the MACD indicator?
The three components are the MACD line (the difference between the 12-period and 26-period EMAs), the Signal line (a 9-period EMA of the MACD line), and the Histogram (the difference between the MACD and Signal lines).
What is a MACD crossover?
A MACD crossover is a common trading signal. A bullish crossover occurs when the MACD line crosses above the signal line, suggesting upward momentum. A bearish crossover happens when the MACD line crosses below the signal line, indicating downward momentum.
Is MACD a leading or lagging indicator?
MACD is a lagging indicator because its calculations are based on historical price data from moving averages. This means its signals appear after a price trend has already begun, serving as confirmation rather than a prediction.
What is MACD divergence?
Divergence is a powerful signal that occurs when the MACD indicator moves in the opposite direction of the stock price. For example, if the price makes a new high but the MACD makes a lower high, it's called bearish divergence and may signal a potential trend reversal.