In the application of MACD, the fast moving average (EMA 1) and the slow moving average (EMA2) are first calculated, and these two values are taken as the measures of both (fast and slow).
Line), and then find the smma DEA (also called MACD, DEM) line of DIF n period.
Take the parameters of EMA 1 as 12, EMA2 as 26 and DIF as 9 as examples to see the calculation process of MACD.
1, calculate the moving average (EMA)
The formula of 12 moving average is
EMA (12) = EMA (12)1113+today's closing price 2/ 13.
The formula of the 26-day moving average is
Average (26)= the average of the previous day (26)25/27+ 2/27 of today's closing price.
2. Calculate the deviation value (DIF)
DIF= Today's EMA (12)- Today's EMA (26)
3. Calculate the 9-day moving average of DIF.
According to the deviation value, the EMA of 9 days, which is the average deviation value, is the required MACD value. To avoid confusion with the original name of the index, this value is also called DEA or DEM.
Today's DEA(MACD)= dea8/10 of the previous day+DIF2/ 10 of today.
The calculated values of DIF and DEA are both positive or negative.
Theoretically, in the continuous upward trend, the moving average of 12 is above the moving average of 26, and the positive deviation (+DIF) between them will become larger and larger; On the contrary, in the downward trend, deviation may
When it becomes negative (-—DIF), it will get bigger and bigger, and when the market starts to improve, the difference between positive and negative will decrease. The index MACD uses positive and negative DIF and dif.
The crossing signal of N-moving average is taken as the basis of buying and selling signals, that is, the buying and selling signals are analyzed by the principle of crossing fast and slow lines again. In addition, the MACD indicator is
There is also an auxiliary index in the stock market software-stick stick, whose formula is: bar = 2 (dif-DEA), and we can still use the shrinkage of stick stick to determine the trading time.
Machine.
DIF and DEA are the main tools to judge MACD. Its calculation method is complicated, because at present these calculated values will be calculated by stock market analysis software.
The computer is completed automatically, and investors only need to understand its operation process, and more importantly, master its judgment function. In addition, like the calculation of other indicators, due to the selected
MACD indicators include daily MACD indicators, weekly MACD indicators, monthly MACD indicators, annual MACD indicators and minute MACD indicators.
Daily MACD indicators and weekly MACD indicators are often used in stock market research. Although their calculated values are different, the basic calculation method is the same.
In practice, the DIF and DEA(MACD) connecting each point will form two fast (short-term) lines and slow (long-term) lines moving up and down on the zero axis, which is the MACD chart.