What is the MACD indicator or Moving Average Convergence Divergence? This indicator is a dual-function analysis tool that can identify (Trend) of prices and measure (Momentum) strength simultaneously. Since it was invented by analyst Gerald Appeal in the late 1970s, this tool has gained high trust among traders and investors.
The MACD indicator is developed from applying Moving Averages, calculating the difference between two EMA lines (Convergence Divergence) to observe changes in price trends. The significance of the MACD indicator is that it helps traders detect trend reversals promptly.
Components of the MACD Indicator
The actual MACD indicator consists of three main parts, each with a different role:
MACD Line - The first component
The MACD line is the result of subtracting the EMA over a short period (EMA 12) from the EMA over a longer period (EMA 26). This can be interpreted as follows:
When MACD > 0 (above the Central Line), it indicates that the short-term average price is higher than the long-term average, suggesting an uptrend.
When MACD < 0 (below the Central Line), it indicates that the short-term average price is lower than the long-term average, suggesting a downtrend.
Additionally, the strength of the trend can be gauged from the slope of the MACD line. If the slope is increasing (whether positive or negative), the trend is strengthening. If the slope is decreasing, i.e., the line is flattening, it signals that the trend is weakening.
Signal Line - Trend confirmation line
The Signal Line is calculated as an EMA 9 of the MACD itself. Traders use this line to confirm signals by comparing it with the MACD line:
When MACD > 0 and Signal Line > MACD, this is called a Bullish MACD, confirming an uptrend.
When MACD < 0 and Signal Line < MACD, this is called a Bearish MACD, confirming a downtrend.
Note that the Signal Line does not always have to be an EMA 9; traders can adjust the period for more accurate signals, such as changing to EMA 5 or EMA 7 for better precision.
MACD Histogram - Clear display of divergence
The MACD Histogram is calculated as MACD – Signal Line, visually represented by bars:
Histogram > 0 (positive) indicates MACD > Signal Line, signaling an uptrend. If the positive value increases, the uptrend is strengthening; if it decreases, the trend is weakening.
Histogram < 0 (negative) indicates MACD < Signal Line, signaling a downtrend. If the negative value increases, the downtrend is strengthening; if it decreases, the trend is weakening.
Histogram = 0 is a critical point, indicating MACD = Signal Line, which suggests a potential trend reversal.
EMA vs SMA in MACD Calculation
Why choose EMA over SMA? Moving Averages come in two types: SMA, which assigns equal weight to all data points, and EMA, which gives more weight to recent data.
EMA is preferred for MACD because it responds faster to price changes, providing earlier signals than SMA. This makes EMA more suitable for analyzing time series data like stock prices.
Example Calculation of MACD from USDCHF Data
The calculation formulas are as follows:
EMA(12) = (P × k) + (EMA(n-1) × (1 - k)(
EMA)26) = (P × k) + (EMA(n-1) × (1 - k))
where k = 2 / (n + 1)
Then, the Signal Line is calculated as:
EMA(9( = )MACD × k) + (EMA(n-1) × (1 - k))
And the Histogram is:
Histogram = MACD – Signal Line
Date
Close
EMA(12)
EMA(26)
MACD
Signal Line
Histogram
21/07/2023
0.8651
0.8705
0.8808
-0.0104
-0.0067
-0.0037
20/07/2023
0.8579
0.8728
0.8821
-0.0093
-0.0057
-0.0036
19/07/2023
0.8576
0.8755
0.8840
-0.0086
-0.0048
-0.0037
18/07/2023
0.8604
0.8787
0.8861
-0.0074
-0.0039
-0.0035
09/06/2023
0.8987
0.9062
0.9014
0.0049
0.0038
0.0011
Plotting these values will show the movements of EMA(12( and EMA)26), and the difference between them is plotted as the MACD line with the Signal Line (EMA(9) of MACD), clearly indicating crossover points.
What does the MACD indicator tell traders?
( First capability: Trend indication
Fundamentally, when prices are in an uptrend, the short-term EMA is higher than the long-term EMA, making MACD > 0. Traders interpret this as an uptrend. Conversely, when MACD < 0, it indicates a downtrend.
The critical point is when MACD = 0, which is the moment when the two EMAs are equal, signaling a potential trend change.
) Second capability: Measuring trend strength
The slope of the MACD line indicates the momentum of the trend. If the slope is increasing positively, the uptrend is strong; if decreasing or becoming negative, the downtrend is strong.
Conversely, a decreasing slope suggests weakening momentum.
( Third capability: MACD Divergence signals
MACD Divergence occurs when the price and MACD indicator do not agree:
Bearish Divergence occurs when the price makes a new high but MACD makes a lower high, indicating a possible trend reversal.
Bullish Divergence occurs when the price makes a new low but MACD makes a higher low, suggesting the downtrend may end.
How to use MACD for trading
) Method 1: Zero-Cross - Crossing the center line
The simplest method is to observe when MACD crosses the Central Line:
Buy Signal occurs when MACD crosses above the Central Line from below, turning positive, indicating a potential uptrend.
Sell Signal occurs when MACD crosses below the Central Line from above, turning negative, indicating a potential downtrend.
( Method 2: MACD Crossover - Crossing Signal Line
This method is faster than Zero-Cross, detecting changes earlier.
Buy Signal occurs when MACD crosses above the Signal Line, even if MACD is still negative and below the Central Line.
Sell Signal occurs when MACD crosses below the Signal Line, even if MACD is still positive and above the Central Line.
This method provides more significant signals but occurs less frequently.
Buy Signal when the price makes a new low but MACD makes a higher low, indicating divergence.
Sell Signal when the price makes a new high but MACD makes a lower high, indicating divergence.
Combining MACD with other tools
( MACD + RSI
RSI is a Momentum indicator that reacts quickly to price changes, while MACD is a lagging indicator. Combining both improves accuracy:
Buy Signal when RSI enters Oversold territory )below 30### and MACD crosses above the Central Line.
Sell Signal when RSI enters Overbought territory ###above 70### and MACD crosses below the Central Line.
( MACD + Bollinger Bands
Bollinger Bands show overbought or oversold levels. When the price touches the band edges along with MACD signals, it indicates a trend reversal:
Buy Signal when the price breaks below the lower band and MACD crosses above the Central Line.
Sell Signal when the price breaks above the upper band and MACD crosses below the Central Line.
) MACD + William %Range
William %Range measures overbought or oversold conditions:
Buy Signal when William %Range enters oversold territory ###below -80### and MACD crosses above the Central Line.
Sell Signal when William %Range enters overbought territory ###above -20### and MACD crosses below the Central Line.
Limitations of the MACD Indicator
The MACD indicator is a lagging indicator, meaning it signals after price changes occur:
First limitation: Zero-Cross, which is a slow signal, often occurs after the trend has already started.
Second limitation: MACD Crossover can produce false signals frequently in sideways markets.
Third limitation: MACD Divergence is rare and can take a long time to develop.
Therefore, MACD should not be used alone; traders should combine it with other tools and indicators to improve accuracy.
Summary
The MACD indicator is a powerful analysis tool that helps traders identify (Trend) and measure (Momentum) strength simultaneously. Despite its limitations, when integrated into a comprehensive trading system, it significantly enhances decision-making accuracy. Traders should practice using MACD through demo accounts, test across different timeframes, and fine-tune parameters to develop a trading system suited to their trading style.
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
MACD: A Trend Indicator Traders Must Know and How to Use It Accurately
Basic Knowledge About MACD Indicator
What is the MACD indicator or Moving Average Convergence Divergence? This indicator is a dual-function analysis tool that can identify (Trend) of prices and measure (Momentum) strength simultaneously. Since it was invented by analyst Gerald Appeal in the late 1970s, this tool has gained high trust among traders and investors.
The MACD indicator is developed from applying Moving Averages, calculating the difference between two EMA lines (Convergence Divergence) to observe changes in price trends. The significance of the MACD indicator is that it helps traders detect trend reversals promptly.
Components of the MACD Indicator
The actual MACD indicator consists of three main parts, each with a different role:
MACD Line - The first component
The MACD line is the result of subtracting the EMA over a short period (EMA 12) from the EMA over a longer period (EMA 26). This can be interpreted as follows:
Additionally, the strength of the trend can be gauged from the slope of the MACD line. If the slope is increasing (whether positive or negative), the trend is strengthening. If the slope is decreasing, i.e., the line is flattening, it signals that the trend is weakening.
Signal Line - Trend confirmation line
The Signal Line is calculated as an EMA 9 of the MACD itself. Traders use this line to confirm signals by comparing it with the MACD line:
Note that the Signal Line does not always have to be an EMA 9; traders can adjust the period for more accurate signals, such as changing to EMA 5 or EMA 7 for better precision.
MACD Histogram - Clear display of divergence
The MACD Histogram is calculated as MACD – Signal Line, visually represented by bars:
EMA vs SMA in MACD Calculation
Why choose EMA over SMA? Moving Averages come in two types: SMA, which assigns equal weight to all data points, and EMA, which gives more weight to recent data.
EMA is preferred for MACD because it responds faster to price changes, providing earlier signals than SMA. This makes EMA more suitable for analyzing time series data like stock prices.
Example Calculation of MACD from USDCHF Data
The calculation formulas are as follows:
EMA(12) = (P × k) + (EMA(n-1) × (1 - k)(
EMA)26) = (P × k) + (EMA(n-1) × (1 - k))
where k = 2 / (n + 1)
Then, the Signal Line is calculated as:
EMA(9( = )MACD × k) + (EMA(n-1) × (1 - k))
And the Histogram is:
Histogram = MACD – Signal Line
Plotting these values will show the movements of EMA(12( and EMA)26), and the difference between them is plotted as the MACD line with the Signal Line (EMA(9) of MACD), clearly indicating crossover points.
What does the MACD indicator tell traders?
( First capability: Trend indication
Fundamentally, when prices are in an uptrend, the short-term EMA is higher than the long-term EMA, making MACD > 0. Traders interpret this as an uptrend. Conversely, when MACD < 0, it indicates a downtrend.
The critical point is when MACD = 0, which is the moment when the two EMAs are equal, signaling a potential trend change.
) Second capability: Measuring trend strength
The slope of the MACD line indicates the momentum of the trend. If the slope is increasing positively, the uptrend is strong; if decreasing or becoming negative, the downtrend is strong.
Conversely, a decreasing slope suggests weakening momentum.
( Third capability: MACD Divergence signals
MACD Divergence occurs when the price and MACD indicator do not agree:
How to use MACD for trading
) Method 1: Zero-Cross - Crossing the center line
The simplest method is to observe when MACD crosses the Central Line:
Buy Signal occurs when MACD crosses above the Central Line from below, turning positive, indicating a potential uptrend.
Sell Signal occurs when MACD crosses below the Central Line from above, turning negative, indicating a potential downtrend.
( Method 2: MACD Crossover - Crossing Signal Line
This method is faster than Zero-Cross, detecting changes earlier.
Buy Signal occurs when MACD crosses above the Signal Line, even if MACD is still negative and below the Central Line.
Sell Signal occurs when MACD crosses below the Signal Line, even if MACD is still positive and above the Central Line.
) Method 3: MACD Divergence - Contradiction signals
This method provides more significant signals but occurs less frequently.
Buy Signal when the price makes a new low but MACD makes a higher low, indicating divergence.
Sell Signal when the price makes a new high but MACD makes a lower high, indicating divergence.
Combining MACD with other tools
( MACD + RSI
RSI is a Momentum indicator that reacts quickly to price changes, while MACD is a lagging indicator. Combining both improves accuracy:
( MACD + Bollinger Bands
Bollinger Bands show overbought or oversold levels. When the price touches the band edges along with MACD signals, it indicates a trend reversal:
) MACD + William %Range
William %Range measures overbought or oversold conditions:
Limitations of the MACD Indicator
The MACD indicator is a lagging indicator, meaning it signals after price changes occur:
Therefore, MACD should not be used alone; traders should combine it with other tools and indicators to improve accuracy.
Summary
The MACD indicator is a powerful analysis tool that helps traders identify (Trend) and measure (Momentum) strength simultaneously. Despite its limitations, when integrated into a comprehensive trading system, it significantly enhances decision-making accuracy. Traders should practice using MACD through demo accounts, test across different timeframes, and fine-tune parameters to develop a trading system suited to their trading style.