Calculation of MACD Formula

2023-06-05
Summary:

Uncover the MACD formula and calculation method for insightful trading strategies. Master MACD calculation to improve investment decisions in forex.

How to Calculate MACD Formula 

MACD should first calculate the fast (usually 12 days) moving Average value and the slow (usually 26 days) moving average value in application. Use these two values as the basis for measuring the "difference value" between the two (fast and slow lines).


The so-called "difference value" (DIF) refers to the 12 day EMA value minus the 26 day EMA value. Therefore, in the sustained upward trend, the 12th EMA is above the 26th EMA. The positive deviation value (+DIF) between them will become larger and larger. On the contrary, in a downward trend, the difference value may become negative (- DIF) and also increase.


As for the degree to which the positive or negative deviation value needs to be reduced when the market starts to turn around, it is truly a signal of market reversal. The reversal signal of MACD is defined as the 9-day moving average (9-day EMA) of the "difference value".

MACD

The calculation formula for MACD indicators involves three parts: fast line, slow line, and bar chart.

1. Calculate Fast Line (EMA12)

Firstly, it is necessary to calculate the 12 day average index (EMA12) of the closing price, which is:

EMA12=Previous day EMA12 x 11/13+Today's closing price x 2/13

Among them, 11/13 and 2/13 are weighting coefficients that can be adjusted according to different analysis requirements.


2. Calculate Slow Line (EMA26)

Next, it is necessary to calculate the 26 day average index (EMA26) of the closing price, which is:

EMA26= Previous day EMA26 x 25/27+Today's closing price x 2/27

Similarly, 25/27 and 2/27 are weighted coefficients.


3. Calculate Bar Charts (DIF and DEA)

Finally, the difference between the fast and slow lines can be used as a bar chart (DIF) to measure price momentum and trend changes, while also calculating the 9-day moving average (DEA) of the DIF, which is:

DEA=previous day's DEA x 8/10+today's DIF x 2/10


Finally, the calculation formula for MACD indicators can be expressed as:

MACD= DIF - DEA

Its IF is the difference between the fast line and the slow line, DEA is the 9-day moving average of DIF, and MACD is the bar chart. It should be noted that the value of MACD index can be positive, negative or zero, and its size and direction reflect the change and trend intensity of market price.


【 EBC Platform Risk Reminder and Disclaimer 】: There are risks in the market, and investment needs to be cautious. This article does not constitute investment advice.

Procter & Gamble Stock Performance and Analysis

Procter & Gamble Stock Performance and Analysis

Procter & Gamble leads in consumer goods with diverse brands and innovation. Its stock has seen a 1.673% increase since 1990. showing stable growth.

2024-09-06
Capital Adequacy's Definition, Impact, Standards

Capital Adequacy's Definition, Impact, Standards

The capital adequacy ratio measures a bank's financial health and risk tolerance. A high ratio boosts stability, but too high may reduce efficiency.

2024-09-06
Johnson & Johnson and Its Stock Performance

Johnson & Johnson and Its Stock Performance

Johnson & Johnson leads in healthcare with strong finances. The stock is near fair value, offering a good entry point despite market risks.

2024-08-30