The Moving Average Convergence Divergence (MACD) is an oscillator-type indicator that is widely used by traders in technical analysis (TA). MACD is a trend-following tool that uses moving averages to determine the direction of a stock, cryptocurrency, or other tradable asset.
Developed by Gerald Appel in the late 1970s, the Moving Average Convergence Divergence indicator records past price movements and therefore falls into the category of lagging indicators (those that provide trading signals based on past price action or data). The MACD can be used to measure market movement and possible price trends and is used by many traders to spot potential buy and sell opportunities.
Before we delve into the mechanics of MACD, it is important to understand the concept of moving averages. A moving average (MA) simply represents the average of historical data over a predefined period of time. In the context of financial markets, moving averages are one of the most popular indicators in technical analysis (TA), and they can be divided into two different types: simple moving average (SMA) and exponential moving average (EMA). SMA is able to weight all data inputs equally, while EMA gives more weight to the most recent data values (newer price points).
MACD working principle
The MACD indicator generates the main line (MACD line) by subtracting two exponential moving averages (EMAs), which is then used to calculate another exponential moving average (EMA) representing the signal line.
Additionally, there is the MACD histogram, which is calculated based on the difference between these two lines. The histogram, along with the other two lines, fluctuates above and below the center line, also called the zero line.
Therefore, the MACD indicator consists of three elements moving around the zero line:
MACD line (1): helps determine upward or downward movement (market trend). It is calculated by subtracting two exponential moving averages (EMAs) from each other.
Signal Line (2): EMA of MACD line (EMA with a period interval of 9). The combined analysis of the signal line and MACD line helps to find potential reversals or entry and exit opportunities.
Histogram (3): Graphical representation of the divergence and convergence of MACD lines and signal lines. In other words, the histogram is calculated based on the difference between the two lines.
MACD line
Generally speaking, the exponential moving average is calculated based on the closing price of the asset, and the periods used to calculate the two EMAs are usually set to 12 periods (faster) and 26 periods (slower). Periods can be configured in different ways (minutes, hours, days, weeks, months), but this article will focus on day-to-day routine settings. Nonetheless, the MACD indicator can be customized for different trading strategies.
Assuming the time frame is set at the standard range, the MACD line is calculated by subtracting the 26-day EMA from the 12-day EMA.
MACD line = 12-day EMA – 26-day EMA
As mentioned above, the MACD line oscillates above and below the zero line, which is a signal of a centerline crossover, telling traders when the relative positions of the 12-day and 26-day EMAs have changed.
Signal line
By default, the signal line is calculated from the 9-day EMA of the main line, thus providing further analysis of its previous movements.
Signal Line = 9-day exponential moving average of the MACD line
While they are not always accurate, when the MACD line and signal line cross, the event is often seen as a signal of a trend reversal, especially when they occur at the top of the MACD chart (well above or well below zero line) time.
MACD histogram
The histogram is a visual record of the relative movement of the MACD line and the signal line. It is calculated by subtracting the two:
MACD Histogram = MACD Line - Signal Line
However, instead of adding a third moving line, the histogram consists of bars, making it visually easier to read and interpret. Note that the histogram bars have nothing to do with the asset's trading volume.
MACD settings
As mentioned above, the default setting for MACD is based on 12, 26 and 9 period EMAs - i.e. MACD(12,26,9). However, some technical analysts and chartists may use more sensitive period indicators. For example, MACD(5,35,5) or longer timeframe periods are often used in traditional financial markets, such as weekly or monthly charts.
It is worth noting that due to the extreme volatility of the cryptocurrency market, increasing the sensitivity of the MACD indicator may create more false signals and misleading information, creating risks.
How to Read a MACD Chart
As the name suggests, the Moving Average Convergence Divergence indicator focuses on the relationship between moving averages. The relationship between two lines can be described as convergent or divergent. When two lines approach each other it is called convergence, and when they move apart they are divergent.
Nonetheless, MACD indicator related signals are related to so-called crossover points, which occur when the MACD line crosses above or below the center line (a center line crossover occurs) and above or below the signal line (a signal line crossover occurs) .
Keep in mind that center and signal line crossovers can occur multiple times, producing many false and misleading signals - especially when it comes to volatile assets like cryptocurrencies. Therefore, one should not rely solely on the MACD indicator.
center line crossing
A centerline crossover occurs when the MACD line moves in an area above or below the centerline. When it crosses the center line upward, it is a positive MACD, indicating that the 12-day EMA average is greater than the 26-day average. Conversely, when the MACD line crosses the centerline downward, it is a negative MACD, indicating that the 26-day EMA average is higher than the 12-day EMA. In other words, a positive MACD indicates stronger upward momentum, while a negative MACD indicates stronger downward momentum.
Signal line crossover
When the MACD line crosses the signal line, traders often consider a potential buying opportunity (entry point) to exist. On the other hand, when the MACD line crosses the signal line downward, traders tend to view it as a selling opportunity (exit point).
While signal line crossovers can be helpful, they are not always reliable. We also need to consider their placement on the chart to minimize risk. For example, if a buy signal occurs when the signal line crosses, but the MACD line indicator is below the center line (negative value), the market condition may still be considered bearish. On the contrary, if the signal line crosses and a sell signal occurs, but the MACD line indicator is above the center line (positive value), the market conditions may still be bullish. In this case, a sell signal following the signal crossover may bring more risk (a larger downward trend).
MACD and Price Divergence
In addition to centerline and signal line crossovers, signals can also be spotted through divergences between the MACD chart and the asset’s price.
For example, if a cryptocurrency's price action is rising, but the MACD is making a lower high, we would consider a top divergence to be occurring, a situation that indicates that despite the price increase, the upward momentum (buying pressure) is not as strong as before. Top divergences are often interpreted as selling opportunities because they tend to precede a price reversal.
Conversely, if the MACD line forms two rising lows that coincide with two falling lows in the asset's price, it is considered a bottom divergence, indicating stronger buying pressure despite falling prices. If a bottom divergence occurs before a price change, it may indicate a reversal of the short-term bottom (from a downtrend to an uptrend).
Summary thoughts
The Moving Average Convergence Divergence indicator is one of the most useful tools when it comes to technical analysis (TA). Not only is it relatively easy to use, it is also very effective in determining market trends and market momentum.
However, like most technical indicators, MACD is not always accurate and can provide a lot of false and misleading signals, especially when analyzing less stable assets or when the market is weak and sideways. Therefore, many traders also use MACD and other indicators, such as the RSI indicator, to further reduce risk and confirm signals.