MACD Formula

The following is the formula for calculating the MACD (Moving Average Convergence Divergence):

 

MACDt = EMA1 - EMA2

 

EMA1 and EMA2 are exponential moving averages at period t with different smoothing factors.

Reference: Appel, Gerard, The Moving Average Convergence Divergence Trading Method