MACD stands for Moving Average Convergence Divergence. It is an oscillator-type indicator that is widely used by traders for technical analysis (TA). MACD is a trend analysis tool that uses moving averages to analyze the performance of stocks, cryptocurrencies, or other tradable assets.

Developed by Gerald Appel in the late 1970s, the MACD indicator tracks pricing events that have already occurred and thus falls into the category of lagging indicators known as lagging indicators (which provide signals based on past price actions or data ). The MACD can be useful for measuring market dynamics and possible price trends and is used by many traders to identify possible entry and exit points.

Before delving into the mechanics of the MACD, it is important to understand the concept of moving averages. A moving average (MA) is simply a line that represents the average value of past data over a given period. In the context of financial markets, moving averages are among the most popular indicators for technical analysis (TA) and can be divided into two different types: simple moving averages (SMAs) and exponential moving averages (EMAs). While SMAs indicators weigh all data inputs equally, EMAs attach greater importance to the most recent data values ​​(most recent price points).


How the MACD works

The MACD indicator is generated by subtracting two exponential moving averages (EMAs) to create the main line (MACD line), which is then used to calculate another EMA that represents the signal line.

Additionally, there is the MACD histogram, which is calculated based on the differences between these two lines. The histogram, along with the other two lines, fluctuates above and below a center line, which is also known as the zero line.

Therefore, the MACD indicator consists of three elements that move around the zero line:

  • The MACD line (1): helps determine upward or downward momentum (market trend). It is calculated by subtracting two exponential moving averages (EMA).

  • The signal line (2): is an EMA of the MACD line (usually 9-period EMA). Combined analysis of the signal line with the MACD line can be useful in detecting possible reversals or entry and exit points.

  • Histogram (3): is a graphical representation of the divergence and convergence of the MACD line and the signal line. In other words, the histogram is calculated based on the differences between the two lines.

Como Funciona o Indicador MACD


The MACD line

In general, exponential moving averages are measured according to the closing prices of an asset, and the periods used to calculate the two EMAs are generally defined as 12 periods (fastest) and 26 periods (slowest). The period can be configured in different ways (minutes, hours, days, weeks, months). This article will focus on daily settings, however, the MACD indicator can be customized to accommodate different trading strategies.

Assuming standard time frames, the MACD line itself is calculated by subtracting the 26-day EMA from the 12-day EMA.

MACD Line =EMA 12d - EMA 26d

As mentioned, the MACD line oscillates above and below the zero line, and this is what signals so-called centerline crossovers, showing traders when the 12-day and 26-day EMAs are changing their relative position.


The signal line

By default, the signal line is calculated from the nine-day EMA of the main line and therefore provides more information about its previous movements.

Signal line =EMA 9d of MACD line

Although not always accurate, when the MACD line and signal line cross, these events are generally considered trend reversal signals, especially when they occur at the extreme ends of the MACD chart (far above or far below the zero line).


The MACD histogram

The histogram is nothing more than a visual record of the relative movements of the MACD line and the signal line. It is simply calculated by subtracting one from the other:

MACD histogram = MACD line - signal line

However, instead of adding a third moving line, the histogram is made up of a bar graph, making it visually easier to read and interpret. Please note that the histogram bars have nothing to do with the asset's trading volume.


MACD Settings

As discussed, the default MACD settings are based on the 12, 26, and 9 period EMAs - hence MACD(12,26,9). However, some analysts and technicians change the periods as a way to create a more sensitive indicator. For example, the MACD (5,35,5) is often used in traditional financial markets for longer-term trading, such as weekly or monthly charts.

It is worth noting that due to the high volatility of cryptocurrency markets, increasing the sensitivity of the MACD indicator can be risky as it will possibly result in more false signals and misleading information.


Interpreting MACD Charts

As the name suggests, the MACD (Moving Average Convergence/Divergence) indicator tracks the relationships between moving averages, and the correlation between the two lines can be described as converging or diverging. Convergent when the lines move towards each other and divergent when they move away from each other.

Still, the relevant signals of the MACD indicator are related to so-called crossovers, which happen when the MACD line crosses above or below the center line (center line crossovers), or above or below the signal line (signal line crossovers). .

Keep in mind that centerline and signal line crossovers can occur multiple times, producing many false and complicated signals - especially in relation to volatile assets such as cryptocurrencies. Therefore, one should not rely solely on the MACD indicator.


Centerline Crossovers

Centerline crossovers occur when the MACD line moves in both the positive and negative area. When the MACD line crosses above the center line, the positive MACD value indicates that the 12-day EMA is higher than the 26-day EMA. A negative MACD is shown when the MACD line crosses below the center line, indicating that the 26-day average is greater than the 12-day average. In other words, a positive MACD line suggests positive momentum, while a negative MACD value may indicate stronger momentum to the downside.


Signal line crossover

When the MACD line crosses above the signal line, traders often interpret it as a potential buying opportunity (entry point). On the other hand, when the MACD line crosses below the signal line, traders tend to consider it as a selling opportunity (exit point).

Although signal crossovers can be useful, they are not always reliable. It is also worth considering where they occur on the chart as a way of minimizing risk. For example, if the crossover indicates a buy, but the MACD line indicator is below the center line (negative), market conditions may still be considered bearish. On the other hand, if a signal line crossover indicates a potential sell point, but the MACD line indicator is positive (above the zero line), market conditions still tend to be bullish. In this scenario, following the sell signal may carry more risk (considering the larger trend).


MACD and price divergences

Along with centerline and signal line crossovers, MACD charts can also provide information through divergences between the MACD chart and asset price changes.

For example, if the price action of a cryptocurrency shows a higher rally while the MACD creates a lower rally, we would have a bearish divergence, indicating that despite the price increase, the bullish momentum (buying pressure) is not as strong. strong. Bearish divergences are often interpreted as selling opportunities because they tend to precede price reversals.

On the contrary, if the MACD line forms two rising lows that align with two falling lows on the asset's price, then this is considered a bullish divergence, suggesting that despite the fall in prices, buying pressure is more strong. Bullish divergences tend to precede price reversals, potentially indicating a short-term bottom (from a downtrend to an uptrend).


Final considerations

When it comes to technical analysis (TA), the MACD indicator is one of the most useful tools out there. Not only because it is relatively easy to use, but also because it is quite effective in identifying market trends and dynamics.

However, like most TA indicators, the MACD is not always accurate and can provide several false and misleading signals - especially in relation to volatile assets or during consolidation markets (missing or weak trends). Consequently, many traders use the MACD with other indicators – such as the RSI indicator – to reduce risks and confirm signals with greater accuracy.