MACD is a momentum and trend-following indicator. It is the difference between a longer-period and a shorter-period exponential moving average of closing prices. Typically, 12-day and 26-day periods are used and the formula is as follows:
MACD Line = 12-day exponential moving average - 26-day exponential moving average
MACDs also plot a Signal Line, which is the 9-day EMA of MACD Line
There are three methods for interpreting the MACD.
Crossovers: It is considered a bearish signal when the MACD falls below the signal line, while a bullish signal occurs when the MACD rises above the signal line.
A Divergence occurs when the stock price diverges from the MACD, signalling the end of the current trend. A divergence is considered bullish when the stock price makes new lows but the MACD does not make new lows. It is considered bearish when the stock price makes new highs but the MACD fails to do so.
A Dramatic Rise occurs when the MACD rises dramatically and the shorter-term moving average pulls away from the longer-term moving average, signalling that the security is overbought.
Parameters
Fast MA Period - How many periods (eg. days) to lookback to calculate the shorter period Moving Average
Slow MA Period - How many periods (eg. days) to lookback to calculate the longer period Moving Average
Signal Period - How many periods (eg. days) to lookback when calculating the EMA of the MACD Line.