MACD (Moving Average Convergence and Divergence) was proposed by Geral Appel in 1970. It uses the aggregation and separation between the short-term (usually 12-day) exponential moving average of the closing price and the long-term (usually 26-day) exponential moving average. Conditions, technical indicators for making judgments on the timing of buying and selling.

MACD should first calculate the fast (usually 12 days) moving average and the slow (generally 26 days) moving average in the 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) is the value of the 12-day EMA minus the value of the 26-day EMA. Therefore, in the continued rally, the 12-day EMA is above the 26-day EMA. The positive deviation (+DIF) during this period will become larger and larger. Conversely, in a downtrend, the deviation value may become negative (-DIF) and become larger. As for the market start to turn, the positive or negative difference must be reduced to a certain degree, and it is the real signal of the market reversal. The MACD reversal signal is defined as the 9-day moving average (9-day EMA) of the “difference”. In MACD’s exponential smoothing moving average calculation formula, the weight of the T+1 trading day is added respectively. Taking the currently popular parameters 12 and 26 as examples, the formula is as follows:

Calculation of the 12-day EMA:
EMA(12) = EMA(12) of the previous day X 11/13 + today’s closing price X 2/13

Calculation of the 26-day EMA:
EMA(26) = EMA(26) X 25/27 + today’s closing price X 2/27

The calculation of the deviation value (DIF): DIF = EMA(12)-EMA(26).

Calculate the 9-day EMA based on the deviation value, that is, the average deviation value, which is the desired DEA value. In order not to be confused with the original name of the indicator, this value is also known as DEA or DEM
Today’s DEA = (Previous day’s DEA X 8/10 + Today’s DIF X 2/10)

Using (DIF-DEA)*2 is the MACD histogram.
MACD indicator formula calculation method
Therefore, the MACD indicator is formed by combining two lines and one column. The fast line is DIF, the slow line is DEA, and the histogram is MACD. Among all kinds of investments, there are the following methods for investors’ reference:

1. When DIF and MACD are both greater than 0 (that is, they are above the zero line on the graph) and move upwards, it is generally indicated that the market is in a long market, and you can buy open positions or long positions;
2. When both DIF and MACD are less than 0 (that is, they are shown below the zero line on the graph) and move down, it is generally indicated that the market is in a short market and can be sold to open a position or wait and see.
3. When DIF and MACD are both greater than 0 (that is, they are above the zero line on the graph) but both move downwards, it is generally indicated that the market is in a downward phase, and you can sell to open a position and wait and see;
4. When DIF and MACD are both less than 0 (that is, they are shown below the zero line on the graph) but move upward, it generally means that the market is about to rise and the stock will rise, and you can buy open positions or long positions.

The Exponential Smoothing Moving Average Convergence and Divergence, or MACD for short, is a technical indicator that uses the aggregation and separation between the short-term exponential average indicator and the long-term exponential average indicator to make judgments on the timing of buying and selling.

MACD developed according to the principle of moving average, firstly overcomes the shortcomings of frequent false signals of the moving average, and secondly, it can ensure the maximum result of the moving average.