MACD (Moving Average Convergence Divergence) is a commonly used trend-following momentum indicator in technical analysis, primarily used in stock, forex, futures, and other financial markets. It consists of the following three parts:
1. DIF (Difference Value): DIF is the difference between the fast moving average (EMA12) and the slow moving average (EMA26). The fast EMA typically uses a 12-period, while the slow EMA typically uses a 26-period.
2. DEA (Signal Line): DEA is the 9-period Exponential Moving Average (EMA9) of the DIF. It is used to smooth the DIF and reduce noise in the signals.
3. MACD Histogram: The histogram represents the difference between DIF and DEA, that is, DIF minus DEA. The histogram is positive when it is above the DIF line and negative when it is below the DIF line.
The calculation steps for MACD are as follows:
1. Calculate the 12-period EMA (Fast EMA).
2. Calculate the 26-period EMA (Slow EMA).
3. Calculate DIF: DIF = Fast EMA - Slow EMA.
4. Calculate DEA: DEA = 9-period EMA of DIF.
5. Calculate the MACD Histogram: MACD = DIF - DEA.
The trading signals of the MACD indicator are usually based on the following situations:
• Golden Cross: When the DIF line crosses above the DEA line, it forms a golden cross, which is often seen as a buy signal.
• Death Cross: When the DIF line crosses below the DEA line, it forms a death cross, which is often seen as a sell signal.
• Histogram crossing the zero axis: When the MACD histogram changes from negative to positive, or from positive to negative, it may indicate a change in market trend.
• Divergence: When the price makes a new high (or low), but the MACD indicator fails to make a new high (or low), this is called a top divergence (or bottom divergence), which may indicate a trend reversal.
MACD is a lagging indicator because it is derived from price data, so it does not predict price movements but rather confirms the existence of trends. When using MACD, it is best to combine it with other technical analysis tools and market analysis to enhance the accuracy of trading decisions.