Moving Average Convergence/Divergence (MACD) Indicator

Moving Average Convergence/Divergence is a trend-following indicator. It shows you whether there is a correlation between two moving averages that follow the price. It’s calculated by subtracting the 26 days EMA from the 12 days EMA. That calculation produces the basic MACD line.

A signal line has to be plotted on top of the MACD, for comparison to that line. The signal line is a nine-day EMA of the MACD. Traders buy when the MACD crosses its signal line from below and sell when the MACD crosses below the signal line.

The following formula is used to calculate Moving Average Convergence/Divergence :

MACD= 12-period EMA-26 period EMA


If the MACD goes above zero, that’s considered a buy signal. If it goes below zero, that’s considered a sell signal. If the MACD goes below its signal line, traders are advised to sell.

Overbought/ Oversold Conditions

The MACD can be used as an overbought indicator. If the MACD rises, it’s likely that the security price is overextending and the market will soon return to price levels that are more realistic.


When divergence is observed, it’s an indication that the current trend may be coming to an end. If the MACD is making new highs while prices aren’t reaching new highs, that’s a bullish divergence. This type of divergence is most significant when it occurs at an overbought level. So, if you’re noticing a bearish divergence, where the MACD is making new lows but prices aren’t going to new lows, it will be especially significant if the market is in an oversold state.

Calculation of MACD

To calculate divergence, a 26 period EMA is subtracted from a 12 period EMA.

The following formula is used to calculate Divergence


These symbols are used in the Divergence formula:

EMA – the Exponential Moving Average;

SMA – the Simple Moving Average;

SIGNAL – the signal line of the indicator

Shopping Cart