XM does not provide services to residents of the United States of America.

Moving Average Convergence Divergence (MACD)

About the MACD

The MACD is a popular oscillator used in technical analysis to identify trends and it stands for Moving Average Convergence Divergence.

The MACD technique uses two exponential moving averages and its main purpose is to provide a smooth trend indicator. It is constructed by subtracting a 26-period exponential moving average (EMA) of the closing price from a 12-period EMA of the closing price:

MACD = EMA(12)-EMA(26)

Therefore, this difference between the two EMAs is plotted as a line on a chart, called the MACD line.

A second line called the signal line is then plotted and is basically a 9 period simple moving average of the MACD line. This is a slower line and basically smoothens out the faster MACD line, making it more accurate. The two MACD lines can be turned into a histogram which looks like vertical bars. This histogram can then be constructed by calculating the difference between the MACD and the signal line.

If you look at the chart below, you can see that as the two moving averages separate, the histogram gets bigger. This is called divergence. On the other hand, as the histogram bars get closer, this means the moving averages get closer to each other, meaning they are converging and creating convergence.

This is how the oscillator gets its name Moving Average Convergence Divergence!

Using the MACD in Trading

The MACD is best used when there is a trend and it can give you buy and sell signals. The MACD indicator fluctuates over a zero line. It is the crossing of this line that generates buy and sell signals.

Note how the histogram crosses over above or below the zero line coinciding with the crossings of the MACD line and its signal. The histogram can be used to identify the strength of the trend.

Bullish Market

When the MACD line is above zero, it means 12EMA is above 26EMA, and we can say the market is bullish. Buy signals are more profitable in an uptrend. Referring to the diagram, we can enter a buy position when the green line (MACD) crosses its signal (red line) from below and we can see that the trend is up.

Bearish Market

Sell signals of the MACD work best when the market is in a downtrend. When the MACD line is below zero, the 12 EMA is below 26EMA, we can say the market is considered bearish. We can enter a sell position when MACD crosses below its signal line from above and prices are moving down.

In the chart below, this happens when the MACD line (green line) crosses its signal line (red line) from above to move below it.

Trading with the MACD Histogram

The histogram can be used to identify the strength of the trend. When the histogram is above the zero line but is falling towards the zero line, we can say the uptrend is weakening and prices are beginning to fall.

Also, when the MACD line is too far above the zero line we have an overbought condition. Likewise, when MACD is too far below the zero line, this suggests an oversold condition. Always determine the direction of the trend before entering a position. The MACD will help you time your entry.

Risk Warning: Your capital is at risk. Leveraged products may not be suitable for everyone. Please consider our Risk Disclosure.