MACD, to some extent, is synonymous with technical indicators. It is one of the most widely used and discussed indicators in finance trading, regardless of the trader’s level.
In this article, we aim to offer a comprehensive beginner’s guide on how to use MACD. We will explore its fundamentals, formula, settings, crossover, and divergence, providing examples from Forex trading to illustrate its application.
What is MACD in Trading
MACD stands for Moving Average Convergence Divergence, it is a technical indicator derived from Moving Average indicator. The full name of MACD explains its logic – researching the convergence and divergence of two different moving average lines.
The fundamental principle of MACD is the same as the Moving Average Indicator:
- when the average price over a short period exceeds the average price over a longer period, it indicates a bullish market.
- conversely, when the average price falls below, it indicates a bearish market.
MACD essentially falls under the umbrella of multiple Moving Average Lines, thus a solid understanding of the Moving Average indicator is essential to understand MACD. For those unfamiliar with Moving Average, please refer to the 「Moving Average in Finance Trading: Applications of MA Indicator」 to gain foundational knowledge.
For those already familiar with Moving Average, the next chapter will provide an easy understanding of MACD.
MACD Formula Calculation
As shown in the graph above, MACD consists of three components: MACD line (the blue line), Signal Line (the yellow line), and histogram. We will explain the formula of each component as well as their meanings.
1). MACD Line
The MACD line represents the difference between two Moving Average(MA) Lines: a Fast Moving Average and a Slow Moving Average. The Fast MA has a shorter length and can be considered the average price over the short term, while the Slow MA indicates the average over the long term.
MACD Line Formula = Fast Moving Average – Slow Moving Average
We can interpret the following information from the value of the MACD line, based on knowledge of Moving Averages:
- Positive value: the short-term average price is higher than the long-term average price, suggesting a bullish market.
- Negative value: the short-term average price is lower than the long-term average price, signaling a bearish market.
2). MACD Signal Line
The MACD Signal Line is the exponential moving average (EMA) of the MACD Line. As its name suggests, it serves as the signal for the MACD Line, which will be explained in detail later in this article.
MACD Signal Line Formula = EMA of MACD Line
The relationship between the MACD Line and the Signal Line mirrors that of the Fast MA Line and the Slow MA Line. The MACD Line, being more sensitive to price movements, can provide earlier signals, but this also means it may generate more false alarms. Conversely, the Signal Line reacts slower to price changes, signaling less frequently but with better reliability.
3). MACD Histogram
The MACD Histogram is calculated as the difference between the MACD Line and the Signal Line. Given that the Signal Line represents the average price of the MACD Line, a positive histogram value indicates that the market price is higher than the average price. In other words, when the histogram value is positive, it suggests that the market is currently rising.
MACD Histogram Line Formula = MACD Line – Signal Line
MACD Indicator Settings
Now that we have learned about the MACD formula, we understand that there are three key settings in the MACD indicator: the calculating length of the fast MA and the slow MA, and the length of the Signal Line.
1. The length of the Fast MA
2. The length of the Slow MA
3. The length of the Signal Line
The graph on the left shows the MACD settings window of TradingView, the world’s most popular charting tool. Notably, the default settings are (12, 26, 9), which align with the default MACD settings for most charting tools.
When analyzing a daily chart with the default settings, it implies that the value of the Fast MA is the average close price of the last 12 days, while the value of the Slow MA is the average close price of the past 26 days. The MACD Signal Line represents the average figure of the last 9 days of the difference between the Fast and Slow MA.
In addition to the default (12, 26, 9), traders have the flexibility to adjust the settings according to their own trading strategy. Below are two other popular settings:
(5,35,5) Settings
Compared to the default settings, the difference between the fast and the slow MA is bigger, meaning weak correlation between the two MA. Thus the crossover will occur earlier, which means ealier trading signal but with higher chance of false signal.
(5,10,5) Settings
In contrast to (5,35,5), this settings come with smaller difference between the fast and the dlow MA, leading to strong correlation between the two MA. Therefore, the crossover signal will happen later but with lower chance of false signal.
In essence, MACD settings still rely on the fundamental principle of MACD. A faster-reacting indicator produces signals more quickly but may result in more false signals. Conversely, a slower-reacting indicator generates signals at a slower pace but with the benefit of fewer false signals.
MACD Zero Line
Returning to the MACD indicator graph, it’s evident that the MACD Line, Signal Line, and Histogram all oscillate around a baseline, often referred to as the zero line.
MACD Above Zero Line:
- When the short-term average price exceeds the long-term average, the MACD shows a positive value, indicating a rising market trend.
MACD Below Zero Line:
- Conversely, a negative MACD means that the market is falling, signaling that the short-term average price is lower than the long-term average.
MACD Crossover
A MACD crossover occurs when the MACD Line crosses the Signal Line, functioning similarly to the crossover of Moving Averages. There are two types of crossovers, depending on whether the MACD Line crosses above or below the Signal Line: bullish MACD crossover and bearish MACD crossover.
1). Bullish MACD Crossover
A crossover where the MACD Line moves above the Signal Line is referred to as a bullish crossover or golden crossover. This occurrence indicates that the short-term average price has transitioned from being below the long-term average price to being above it, signaling a MACD buy signal.
There are two situations of the bullish MACD crossover, as explained below:
MACD bullish crossover below baseline
When the MACD is below the baseline, it signifies that the market is experiencing a downward trend in both the short-term and long-term. Therefore, a MACD bullish crossover occurring below the baseline may indicate that the market has reached its lowest point.
MACD bullish crossover above baseline
This type of bullish crossover typically occurs when the market enters a range or a rising range. While still noteworthy, the likelihood of false signal is higher, and the potential for upward movement may be more limited compared to the golden crossover.
2). MACD Bearish Crossover
A MACD bearish crossover, signifying a sell signal, occurs when the MACD Line crosses the Signal Line from above. Similar to the bullish crossover, the interpretation differs slightly depending on whether the bearish crossover happens below or above the baseline.
A MACD bearish crossover above the baseline is considered more significant, as it suggests that the market may have reached its peak.
The daily chart of the AUDUSD below illustrates two typical MACD bearish crossovers and one bullish crossover. Following these three signals would have resulted in entry prices that were nearly optimal, occurring at the onset of new trends.
MACD Divergence
Among all the uses of MACD, divergence is perhaps the most favored. MACD divergence occurs when the market price reaches a new high or low, but the MACD value fails to follow suit. This discrepancy signals a potential trend reversal, offering traders the opportunity to open positions at the beginning of a new trend.
Similar to crossover, there are two types of divergence: bullish divergence and bearish divergence.
1). MACD Bearish Divergence
MACD bearish divergence, also known as negative divergence, occurs in an downtrend and signals a sell opportunity as it suggests that the market may have reached its peak. During bearish divergence, the market reaches a new record high, while the MACD fails to follow. This indicates a potential loss of momentum in the market, signaling a possible reversal.
On the left side of the graph below, which depicts a daily chart of USDJPY, there is a MACD bearish divergence. Following this divergence, the index transitioned from an uptrend to a over one-month-long downtrend. However, it’s important to note that MACD bearish divergence doesn’t necessarily guarantee a trend reversal.
On the right side of the graph, another bearish divergence is observed, yet the uptrend continued for another four months. Traders should be cautious, as relying solely on MACD bearish divergence as a signal can be risky. It’s advisable to consider other indicators concurrently to validate signals and mitigate potential losses.
2). MACD Bullish Divergence
When the market reaches a new low during a downtrend, while the corresponding MACD value is higher than the previous low, this scenario is known as MACD bullish divergence. It serves as a MACD buy signal, indicating the potential reversal of the downtrend.
Similarly, traders should exercise caution and consider other indicators concurrently, as the downtrend may persist even after a MACD bullish divergence signal.
The graph below illustrates a four-hour chart of EURUSD, showcasing a typical MACD bullish divergence.
MACD Histogram
As previously explained, the MACD histogram is derived from the difference between the MACD Line and the Signal Line, remaining within the MACD framework. In this context, we consider the MACD Line as akin to the market price, while treating the Signal Line as a historical average price.
MACD Histogram Buy Signal
When the histogram rises above the baseline from below it, it indicates a buy opportunity. This mirrors a MACD bullish crossover.
MACD Histogram Sell Signal
Similarly, a sell signal occurs when the histogram falls below the baseline from above it. This resembles the bearish crossover.
In practice, the MACD histogram is often used as a reference rather than a direct trading signal, as it typically mirrors the signals generated by crossovers. However, it offers insights that the MACD Line and Signal Line do not provide directly, particularly through its color coding.
Above the Baseline:
- A dark green histogram indicates that its value is higher than the previous one, suggesting a rising market with strong momentum.
- Conversely, a light green histogram implies that the market may be losing momentum despite being above the baseline.
Below the Baseline:
- A dark red histogram signifies that its value is lower than the previous one, signaling a falling market with significant momentum.
- On the other hand, a light red histogram suggests that the downtrend may be slowing down, even though it remains below the baseline.
Downsides of MACD
As the MACD is developed based on the Moving Average Indicator, it naturally inherits all the downsides associated with Moving Average:
1). Delayed Trading Signal
The MACD calculates the average price over a past period, resulting in a delayed response to the latest market changes. In practical terms, this means that today’s price movements may not be reflected in the MACD until tomorrow or even later.
Furthermore, since the MACD is essentially a moving average of moving average, its delayed nature is more pronounced compared to the moving average. Consequently, the MACD is generally more suitable for long-term trading strategies.
2). Only Suitable for Trend Trading
When the market transitions from a trend to a range-bound state, the MACD may become less useful. This is because the average price over a past period may fail to reflect the absence of a clear trend in such market conditions.
MACD and Stochastic
MACD and Stochastic are often used together as they complement each other’s strengths and weaknesses:
- Stochastic, being highly sensitive to market changes, helps offset the delayed downside of MACD.
- However, the sensitivity of Stochastic can lead to false signals, which MACD can help filter out.
Furthermore, the value of Stochastic is limited to the range of 0 to 100, posing a limitation when the market enters extreme high or low ranges. In contrast, MACD has no such limitation, making it a valuable complement when Stochastic reaches these extreme ranges.
The graph above illustrates the application of MACD and Stochastic indicators on a daily chart of the Dow Jones Index. In late October 2022, when the Dow hit bottom, Stochastic signaled a bullish crossover immediately (marked with a blue vertical line), while MACD indicated a crossover three days later (marked with a red vertical line).
Although there was a Stochastic bullish crossover on October 23, 2022, it was not considered a signal. This is because the MACD indicated a bearish crossover at the same time, underscoring the importance of considering both indicators together in making trading decisions.