loader2
NRI

What is Moving Average Convergence Divergence (MACD)

ICICIdirect 14 Mins 03 May 2023

MACD stands for Moving Average Convergence Divergence, and it is a technical analysis indicator used to identify changes in the momentum, direction, and trend strength of a security or asset. It is essentially an indicator made up of the convergence and divergence of two moving averages.

Developed by Gerald Appel in the late seventies, MACD helps identify the two most important parameters of technical analysis: trend following and momentum.

To put it simply, MACD is a simple yet highly effective and successful momentum indicator, especially when it complements the price action of the markets.

How to calculate the MACD?

The indicator works by comparing two moving averages of the stock's price, one that is calculated over a shorter period of time and another that is calculated over a longer period of time.

Let’s now look at how to calculate the MACD indicator, which is done in three steps:

  • MACD Line: The MACD line represents the difference between the short-term and long-term moving averages, and it's used to identify changes in the trend and momentum of the asset. The MACD line is the difference between the 12-period and 26-period exponential moving averages (EMA). The 12-period EMA is a shorter-term and faster-moving average that is more reactive to changes in price, while the 26-period EMA is a longer-term and slower-moving average that provides a broader view of the asset's trend and is less reactive to price changes. By subtracting the longer-term moving average from the shorter-term moving average, the MACD indicator can identify when the shorter-term moving average crosses above or below the longer-term moving average, which can indicate changes in trend and momentum.
    • When the MACD line is above zero, it indicates that the short-term moving average, that is the 12-period EMA is above the long-term moving average, that is the 26-period EMA, which indicates bullishness in the market.
    • Conversely, when the MACD line is below zero, it indicates that the short-term moving average (12-period EMA) is below the long-term moving average (26-period EMA), which indicates a bearish signal.
    • Signal Line: The signal line is a 9-period exponential moving average of the MACD line. The signal line smooths out the MACD line, making it less volatile and providing a clearer picture of the trend. It's used as a trigger for potential buy or sell signals when it crosses the MACD line.
      • When the MACD line crosses above the signal line, it generates a bullish signal, indicating that it may be a good time to buy the stock.
      • Conversely, when the MACD line crosses below the signal line, it generates a bearish signal, indicating that it may be a good time to sell the stock.
      • Histogram: The histogram in MACD (Moving Average Convergence Divergence) is a visual representation of the difference between the MACD line and the signal line. It's a vertical bar chart that fluctuates above and below the zero line, representing the degree of divergence or convergence between the two lines. The histogram's height reflects the magnitude of the difference between the MACD line and the signal line.
        • When the MACD line is above the signal line, the histogram is positive, indicating bullish momentum.
        • When the MACD line is below the signal line, the histogram is negative, indicating bearish momentum.

Here's the formula to calculate the MACD:

  • MACD Line = 12-period EMA - 26-period EMA
  • Signal Line = 9-period EMA of MACD Line

But why do we use 12, 26, and 9 as our parameters for these lines? The default settings in all trading software are set as 12, 26, and 9 days. Though the answer to this assumption is best known to Gerald Appel, the MACD's creator, of course, nothing is preventing you from altering the settings. The aforementioned adjustments, however, appear to have become "stuck" with the indicator.

The MACD indicator can be seen in the lower panel of the following chart:

The blue line is the MACD line (the fast line), while the red line is the slow signal line. The bars oscillating around zero is the MACD-histogram.

The idea behind the MACD is simple:

The intensity of a trend is indicated by the distance or size between a shorter and longer-term moving average (MA). Additionally, it indicates the strength or momentum of the trend.

The essential idea is that a shorter-term moving average just accounts for recent price movement, whereas a longer-term moving average accounts for recent price movement as well as older price movement.

If there is a clear separation between these two MAs, it indicates that the recent price action is diverging from the earlier price activity. This shows that the market is either heading upward or downward.

Interpretation

To interpret the MACD indicator, you need to look at its components and how they interact with each other. Here are some guidelines for interpreting the MACD:

  1. Crossovers: The most basic signal generated by the MACD is a crossover of the MACD line and the signal line. When the MACD line crosses above the signal line, it's a bullish signal, indicating that the trend is changing to the upside, and it might be a good time to enter into a long trade. Conversely, when the MACD line crosses below the signal line, it's a bearish signal, indicating that the trend is reversing to the downside, and it might be a good time to short the stock or exit from a long position.
 
 
 
  1. Divergence: If the MACD and prices are going in the same direction, this is referred to be convergence. A trend's strength, direction, and momentum are confirmed when the MACD and price movement converge. In other words, we get convergence if prices attain higher highs (during an uptrend) and the MACD is also making higher highs. This means that a trend is said to be stronger when both the price action and the MACD are moving in the same direction.

Divergence, on the other hand, happens when the MACD indicator and the asset's price move in opposing directions. Divergence from price action suggests that a trend may be waning or even reversing.

  • A bullish divergence occurs when the price makes lower lows while the MACD makes higher lows, indicating a potential trend reversal to the upside, that is a change in trend from a downtrend to an uptrend.
  • A bearish divergence occurs when the price makes higher highs while the MACD makes lower highs, indicating a potential trend reversal to the downside, that is a change in trend from uptrend to downtrend.
 
 
  1. Histogram: The histogram is a visual representation of the distance between the MACD and signal lines. The MACD histograms oscillate above and below a "zero line", where the MACD and the signal line intersect. The shape of the histogram is important. When the histogram bars are getting bigger, it indicates that the distance between the MACD and signal lines is increasing, which suggests that the momentum is strengthening in the direction of the trend. Conversely, when the histogram bars are getting smaller, it indicates that the momentum is weakening, and the trend may be losing strength.
 
 

Drawbacks of using MACD

While the MACD is a popular and useful tool for technical analysis, there are some drawbacks to consider when using it:

  1. Lagging indicator: As a lagging indicator that relies on historical price data, the MACD may occasionally fail to deliver timely alerts. Price is often well above the bottom by the time the MACD crosses above the zero line. Likewise, the peak has typically occurred when the MACD crosses below the zero line and the MACD indicates this after the price has changed direction. As a result, it may not be effective in fast-moving markets, where price movements are rapid and unpredictable.
  2. False Signals: Like all technical analysis tools, the MACD can generate false signals. For example, a crossover of the MACD and signal lines may indicate a trend reversal, but the price may continue to move in the same direction, resulting in a losing trade.
  3. Overreliance on Default Settings: The default settings of the MACD are 12, 26, and 9 for the short-term EMA, long-term EMA, and signal line, respectively. However, these settings may not be suitable for all assets and timeframes, and you should experiment with different settings to find what works best for you and your style of investing.
  4. Limited Usefulness in Sideways Markets: The MACD is designed to identify trends, and it may not be as useful in sideways markets, where the price is moving within a range. In such cases, you may need to use other tools, such as oscillators, to identify potential buy and sell signals.

Though there are numerous ways to mitigate these downfalls of the MACD such as waiting for the MACD to go above or below the zero line for a second time - forming its own double top. Therefore, even though traders frequently use the MACD, it may not be the greatest technical instrument to utilise alone when dealing with erratic market changes. Instead, be sure to use it in combination with other technical indicators, like RSI, stochastic or the better one ADX. Watch this space to learn more about MACD strategies.

Enjoy the new Native experience

ICICIdirect APP - All in 1

Download our App and get started with your investment and trading journey with features such as Basket Orders, Stock SIP, Research Recommendations and much more at one place.

icicidirect-qr-code