Stocks & Trading Education Hub Cracking the Code: What is the MACD Indicator?
Jhonattan Jiménez
Everything you read on our site is provided by expert writers who have many years of experience in the financial markets and have written for other top financial publications. Every piece of information here is fact-checked. We sometimes use affiliate links in our content, when clicking on those we might receive a commission – at no extra cost to you. By using this website you agree to our terms and conditions and privacy policy.

The Moving Average Convergence Divergence (MACD) is considered one of the most important indicators traders use for their technical analysis. A MACD is a trend-following technique that uses moving averages to assess the momentum of stocks, cryptocurrencies, and other tradable assets.

Keep reading our “What’s the MACD Indicator?” guide to learn everything you need to know.

What is the MACD Indicator? – Introduction

Definition and explanation of the MACD (Moving Average Convergence Divergence) indicator

The MACD in technical analysis is a popular indicator for assessing financial assets’ momentum and potential trend changes. A MACD line and a signal line are the two main components.

  • MACD Line: To calculate this indicator, subtract the 26-period EMA from the 12-period EMA (Exponential Moving Average). The difference between these two moving averages represents the short-term movement of prices.
  • Signal Line: It is based on a 9-period EMA of the MACD line. When it crosses above or below the MACD line, it smooths out fluctuations in the MACD line and provides trading signals.

A line chart of the MACD indicator provides insights into buying and selling opportunities based on its crossovers and divergences. When MACD crosses above the signal line, it shows potential upward momentum; when MACD crosses below the signal line, it indicates potential downward momentum.

Furthermore, traders often watch for divergences between the MACD and price chart. When the MACD makes higher lows while the price makes lower lows, a bullish divergence indicates that the trend is about to reverse. When the MACD makes lower highs, and the price makes higher highs, it indicates a potential trend reversal to the downside.

Understanding the purpose and significance of the MACD in technical analysis

MACD plays an important role in technical analysis because it provides insight into trends, momentum, and potential trading opportunities. The following are its main purposes:

  • Identifying trends: By using the MACD, traders can identify the direction of the prevailing trend. MACD lines above signal lines indicate a bullish trend, suggesting buying opportunities. On the other hand, a MACD line below the signal line indicates a bearish trend, signaling potential selling opportunities.
  • Momentum Assessment: Financial assets’ price movements are measured by the MACD. Changing slopes quickly indicate momentum, while flattening slopes indicate weak momentum. Analysis of price trends and trading decisions can be made with the MACD indicator for commodities like oil, gold, and agricultural products. Looking for the best commodity apps is essential when using the MACD indicator.
  • Crossover Signals: Buy and sell signals are provided by MACD crossovers. An indication of a bullish crossover takes place when the MACD line crosses above the signal line. Crossing below the MACD line, indicating a potential downward movement, is considered a bearish crossover.
  • Analyzing divergences: When the price trend and the MACD’s trend are not aligned, divergence occurs. Divergence in the bullish direction suggests that a downtrend might weaken, and a reversal is possible.
  • Analyzing multiple timeframes: Traders can apply the MACD to various timeframes to analyze trends and momentum.
  • Forex and Cryptocurrency Analysis: Especially in high-volatility markets like cryptocurrencies and forex, the MACD is popular. Traders use it to analyze the price trend of crypto. This is quite useful when looking for the best crypto presales to invest in.

 Your capital is at risk.

History and Development of the MACD

Origins of the MACD and its creator

In the late 1970s, Gerald Appel created MACD. In the field of technical analysis, Gerald Appel is regarded as one of the most distinguished analysts and authors. To provide traders with a comprehensive view of market trends and potential trading opportunities, he introduced the MACD as a tool to combine trend-following elements with momentum indicators. Among technical analysis indicators, MACD is widely used and well-known.

It was first used in stock trading. Due to the low investment they have to make, traders nowadays consider MACD to invest in penny stocks. If you want to use it, eToro is the best penny stock app, and MACD could adjust to your trading strategy.

Evolution and modifications of the MACD over time

Since MACD indicator creation, it has evolved. A simple moving average was initially used for the signal line, but exponential moving averages were later adopted for smoother signals. A MACD histogram was introduced to enhance visualization by showing the difference between the MACD and signal lines. Traders have explored variations and combinations of the indicator to suit their trading styles, such as MACD divergence analysis. Charting tools and algorithmic trading strategies seamlessly integrated the MACD as digital apps emerged. MACD’s predictive accuracy has also been enhanced using machine learning techniques.

The MACD has evolved to include signal smoothing, histogram additions, parameter customizations, and digital integration. A major reason for its enduring popularity is that it provides insights into trends and momentum shifts, adapting to the changing needs of traders. MACD can be used in the best stock apps; using this method traders can make better informed decisions.

MACD Calculation

Detailed formula and steps for calculating the MACD

The MACD indicator is calculated as follows:

Calculate the 12-period Exponential Moving Average (EMA12):

  • Obtain the closing prices for the asset over the past 12 days (hours, days, etc.).
  • Calculate the EMA using the formula below:
  • EMA12 = (Closing Price Smoothing Factor) + (Previous EMA12  (1 – Smoothing Factor)

Smoothing Factor = 2 / (12 + 1)

Calculate the 26-period Exponential Moving Average (EMA26) as follows:

  • Obtain the closing prices for the asset over the past 26 periods.
  • The EMA is calculated using the same formula as above but with a different smoothing factor:
  • Smoothing Factor = 2 / (26 + 1)

MACD Line Calculation:

  • Subtract the 26-period EMA from the 12-period EMA:
  • MACD Line = EMA12 – EMA26

Calculate the 9-period Exponential Moving Average (Signal Line):

  • EMA9 is calculated by using closing prices of MACD Lines over the last 9 periods.

MACD Histogram calculation:

  • Subtract the Signal Line (EMA9) from the MACD Line:
  • MACD Histogram = MACD Line – Signal Line

Crossovers and divergence patterns provide insight into potential trading opportunities when the MACD is plotted as a line chart. Crossing above the Signal Line indicates potential upward momentum, resulting in a bullish crossover. Crossing the MACD Line below the Signal Line indicates potential downward momentum, indicating a bearish crossover.

Interpretation of the MACD line

Observing crossovers with the signal line, assessing the MACD line’s position relative to the zero line, and recognizing potential divergences with the price chart are all essential components of interpreting the MACD line. MACD line above zero indicates bullish momentum; below zero indicates bearish momentum. A bullish crossover could indicate a buying opportunity, while a bearish crossover could indicate a selling opportunity.

To detect potential trend reversals, divergence analysis compares price and MACD trends. Steep MACD slopes indicate strong trends, while weak trends are indicated by flattening slopes.

 Your capital is at risk.

Signal Line and Histogram

Definition and calculation of the signal line

In the context of MACD, the signal line provides trading signals by smoothing out MACD’s fluctuations. As a result, traders can identify potential trend changes and momentum shifts more clearly. Here is how the signal line is calculated:

  • Calculate the MACD Line:  MACD Line can be calculated by subtracting 26-period EMA from 12-period EMA.
  • Calculate the 9-period EMA of the MACD Line: Calculate the MACD Line’s 9-period EMA using the values calculated in the previous step. As the signal line, we will use this EMA.

This signal line is a moving average of the MACD line, which provides a smoother version of the MACD and assists in identifying trends and reversals. To identify potential trading signals, traders watch the MACD Line and the signal line for crossovers. MACD Line crossovers above the signal line are bullish signals, while crossovers below the signal line are bearish signals.

Understanding the histogram and its role in MACD analysis

A MACD histogram displays a chart with bars representing the gap between the MACD Line and the signal line. Momentum and trend strength are visually represented. A positive bar (above zero) implies bullish momentum, while a negative bar (below zero) indicates bearish momentum.

Traders pay attention to bar crosses above and below zero as indicators of potential trend shifts. Using the histogram and MACD analysis, traders can better understand market momentum and possible trading opportunities.

MACD Crossovers

Explaining bullish and bearish MACD crossovers

The MACD Line crosses either above or below the signal line when there is a bullish or bearish crossover. These crossovers can determine market momentum and trend direction, which are important signals in technical analysis.

Bullish MACD Crossover:

When the MACD Line crosses above the signal line, it’s a bullish crossover. It may be the beginning of an upward trend and a shift from bearish to bullish momentum. Crossing the two lines indicates that the short-term moving average 12-period EMA exceeds the long-term moving average 26-period EMA, indicating a rise in short-term price momentum. A crossover of this kind is often interpreted as a buy signal, indicating a rising price for the asset.

Bearish MACD Crossover:

It is considered a bearish crossover whenever the MACD Line crosses below the signal line. It may signal the start of a downward trend if the momentum shifts from bullish to bearish. The crossover indicates a weakening short-term price momentum since the short-term moving average has fallen below the long-term moving average. Traders view crossovers like this as potential sell signals.

Using crossovers to identify potential trend reversals and trading opportunities

By monitoring the interactions between the MACD Line and the signal line, crossovers can be used to identify potential trend reversals and opportunities for trading. You can do it this way:

Bullish Crossover for Trend Reversal (Buy Signal):

It is a bullish crossover when the MACD Line crosses above the signal line. There is a possibility of reversing to an uptrend when a downtrend loses momentum. If other indicators or price patterns confirm this, traders might consider this a buy signal.

Bearish Crossover for Trend Reversal (Sell Signal):

In a bearish crossover, the MACD Line crosses below the signal line. This might indicate a reversal to a downtrend if an uptrend is weakening. Before taking action, traders should seek further confirmation through other analysis tools.

Verifying crossovers with divergence:

Traders often use divergence between the MACD and price chart to enhance crossover signals. A trend reversal might occur when a bullish crossover is accompanied by a bullish divergence (higher lows in MACD compared to lower lows in price). It is also possible for a trend change to be signaled by bearish crossovers paired with bearish divergence (lower highs in MACD while the price makes higher highs).

Indicators and timeframes:

Using complementary indicators and cross-referencing crossovers from different timeframes can increase confidence in potential trend reversals. Trading accuracy can be improved by verifying signals across multiple timeframes and indicators.

 Your capital is at risk.

Divergence and Convergence

Understanding bullish and bearish divergence with the price chart

When a technical indicator, such as MACD, diverges from the price movement of an asset, it is considered bullish. In this scenario, the asset price creates lower lows, while the indicator, such as the MACD, creates higher lows. The indicator, however, indicates that the momentum is increasing while the price shows a downward trend. In this situation, we could see a possible reversal signal, indicating that the downtrend is losing steam and an upward reversal is imminent.

Contrary to this, a bearish divergence occurs when the asset price makes higher highs while the indicator makes lower highs. The price demonstrates strength by reaching higher levels, but the momentum is declining. Divergence like this could indicate a weakening uptrend, possibly leading to a downward trend reversal.

Analyzing MACD convergence for trend confirmation

MACD convergence is determined by examining the alignment between the MACD Line and the price chart. If the price makes lower lows while the MACD Line is making higher lows, this indicates a potential upward trend reversal. As opposed to this, bearish convergence occurs when prices produce higher highs while MACD Lines produce lower highs, indicating the possibility of a reversal in the downward trend.

Traders can use the convergence pattern to confirm trends since it indicates that momentum and price movements align, increasing the likelihood of a trend continuation or reversal.

Trend Identification with the MACD

Using the MACD to identify the strength and direction of the trend

A MACD determines a trend’s strength and direction by observing its position relative to the zero line and monitoring crossovers. The MACD Line indicates potential bullish strength when it is above the zero line, while it indicates potential bearish strength below the zero line. When the MACD Line crosses over the signal line, it suggests that upward momentum is strengthening, while a bearish crossover indicates that downward momentum is growing.

Different timeframes for trend analysis using the MACD

MACD can analyze trends at different timeframes, such as short-term and long-term charts. Price movements and trends can be quickly observed on shorter timescales, such as intraday or hourly. Observing trends over longer periods, such as daily or weekly, offers a broader perspective.

A comprehensive understanding of the market’s momentum and direction can only be achieved by comparing MACD signals across multiple timeframes.

Overbought and Oversold Conditions

How the MACD can signal overbought and oversold market conditions

The MACD can reveal overbought and oversold market conditions through its histogram and crossovers.

Histogram Peaks and Troughs:

The peaks and troughs of the histogram bars can provide clues about overbought and oversold conditions. Strong buying momentum may be indicated by large positive histogram bars; this could lead to an overbought situation where prices might be correct. An oversold condition could result from substantial negative histogram bars, indicating strong selling pressure.

Bearish and Bullish Divergences:

A bearish divergence occurs when the MACD histogram forms lower highs and the price reaches higher highs. As a result, the price might be overbought, even though momentum is waning, implying that the market is oversold. Alternatively, bullish divergences, which show lower lows on the price graph but higher lows on the histogram, suggest an oversold market despite the price’s decline.

Signal Line Crossovers:

If the MACD Line crosses over the Signal Line (bullish crossover), a potential buying opportunity could arise due to a possible recovery from an oversold condition. When the MACD Line crosses below the Signal Line (bearish crossover), it might indicate overbought conditions with price declines.

Strategies for trading overbought and oversold signals

MACD signals are used for trading overbought and oversold conditions to take advantage of potential price reversals. A few strategies are listed below:

Divergence Confirmation:

A bullish or bearish divergence confirms overbought or oversold signals. There is a potential upward reversal if the MACD histogram exhibits oversold conditions (large negative bars) and bullish divergence forms (higher lows in MACD). A bearish divergence (lower highs in MACD) indicates overbought conditions.

MACD Histogram Reversals:

Watch the MACD histogram for reversals from extreme values. It could signify a potential bounce from oversold conditions if a reversal from negative to positive occurs. Reversals from positive to negative indicate a pullback from overbought conditions.

The confluence of trendlines:

Compare the MACD histogram with trendlines drawn on the price chart. Overbought or oversold conditions on the histogram could indicate a reversal if prices touch a trendline.

Analysis of multiple timeframes:

Check the strength of overbought/oversold signals on different timeframes. Multiple timeframes aligning overbought or oversold conditions could better indicate the potential reversal.

 Your capital is at risk.

MACD and Moving Averages

Combining the MACD with different types of moving averages

Gaining deeper insights into market trends is possible by combining the MACD with different moving averages. Simple Moving Averages (SMAs) and Exponential Moving Averages (EMAs) are two moving averages that can be utilized in trend analysis and trading signals. Using a longer-term SMA with the MACD helps determine the overall trend direction while using a short-term EMA provides timely entry and exit points.

Combining these two indicators gives you a comprehensive understanding of trend strength, momentum shifts, and trading opportunities.

Using moving average crossovers with the MACD for stronger signals

In addition to confirming trends, MACD crossovers can also indicate potential reversals by confirming trends. This approach can be used as follows:

Trend Confirmation:

First, use longer-term moving averages, such as 50-day and 200-day Simple Moving Averages (SMA), to determine the overall trend direction. Generally, an upward trend is confirmed by a bullish crossover of the short-term moving average (e.g., 50-day SMA) above the long-term moving average (e.g., 200-day SMA). In contrast, a bearish crossover confirms a downward trend. Using the MACD is based on this trend confirmation.

MACD Crossovers for Timing:

You may use the MACD to time your trades more precisely once you have established the trend using the moving average crossovers. As an example, look for bullish MACD crossovers during confirmed uptrends. A bearish MACD crossover can indicate a potential sell signal during a downtrend. In conjunction with the moving average trend, these crossovers serve as stronger signals for entry and exit.

Multiple Timeframes:

You can align signals and confirm trends across multiple timeframes by applying moving average crossovers and MACD analysis.

MACD with RSI and Stochastic

Integrating the MACD with other oscillators like RSI and Stochastic

The MACD is combined with other oscillators like RSI and the Stochastic indicator to view market conditions comprehensively. By using these tools together, trading signals can be more robust. By combining the MACD and RSI, for example, you can identify overbought and oversold conditions. Furthermore, synchronizing crossovers and reversals with Stochastic can enhance timing accuracy.

Identifying confirmation signals using multiple indicators

Multiple technical analysis tools validate trading opportunities and identify confirmation signals. For example, the convergence of these signals suggests that an uptrend may develop if the MACD indicates a bullish crossover and the Relative Strength Index (RSI) also indicates oversold conditions. Likewise, looking for a bearish MACD crossover combined with an upward-sloping Moving Average and a Stochastic indicator in overbought territory can be helpful.

Trading with the MACD Indicator – eToro Complete Guide

Now, let’s look at how to get started with a trading app. As a result, we have provided you with instructions based on the top-rated provider eToro, which offers commission-free trading across thousands of markets.

Step 1: Open an Account and Upload ID etoro logo

You can join eToro by clicking the ‘Join Now‘ button on the website. The trading app will require your name, nationality, address, and date of birth, as well as your email address and phone number.

Step 2: Confirm Identity

You must verify your identity as quickly as possible to withdraw funds. You only need to upload two clear copies of the following documents:

  • Driver’s license or passport
  • Recent utility bill or bank statement

Most of the time, eToro will automatically verify your documents.

Step 3: Deposit Funds

Now you can fund your eToro trading account by choosing from several convenient payment methods:

  • Debit cards
  • Credit cards
  • E-wallets such as PayPal, Skrill, and Neteller
  • Bank transfer

Deposits must be at least $10. eToro is also one of the best paper trading apps. So give it a try.

Step 4: Browse Supported Trading Markets

Click the ‘Trade Markets’ button to see which assets are supported. A list of asset classes will be available for trading, including stocks, cryptocurrencies, ETFs, forex, and commodities.

Step 5: Place a Trade

Your next step is to place an order once you have determined which asset you wish to trade.

What is the MACD indicator? – Conclusion

A Moving Average Convergence Divergence oscillator is a valuable tool for technical analysis. It is not only easy to use, but it is also quite effective at identifying trends and timing market movements. However, it is important to note that the MACD is not always accurate and may generate several false or misleading signals, especially during volatile or weak trends or during sideways-moving price action.

Thus, many traders use MACD along with another indicator, such as the RSI, to mitigate risks and confirm signals more reliably.

etoro logo

 Your capital is at risk.


What does the MACD tell us?

What are the 3 numbers in MACD?

Which indicator is better, MACD or RSI?

What is the best setting for MACD indicator?

Jhonattan Jiménez

Jhonattan Jiménez

English Language professional with a vast experience teaching English as a second language, English translator to Spanish, Cryptocurrency enthusiast, interested in geopolitics and economy.