In order for the brothers to better understand, I specially added this diagram



Before using an indicator, one must trace back to its essence, and the best way to understand an indicator from its essence is to read its source code. Once the source code is opened, all mysterious things disappear.

I found that many brothers like to use the MACD indicator, but many usages of MACD in the market are based on assumptions. Today, I invited an A9 master to break down the MACD and discuss it thoroughly with everyone.

1. What is a moving average?

To understand the MACD indicator, one must first understand moving averages.

The so-called moving average is the average of past stock prices and has no predictive significance. For example, a 5-day moving average is the line connecting the average closing prices of the last five days.

For instance (here we use the stock market for easier understanding, while the crypto market is only suitable for top coins), if the past stock prices were in the range of 5-6 yuan, then the moving average would also be in this range. Suddenly, one day the closing price rises to 7 yuan, then the short-term moving average will slightly rise, while the long-term moving average will be less affected and will be relatively sluggish.

Because the short-term moving average is the average of fewer numbers, a sudden large number has a significant impact on the average. In contrast, the long-term moving average is the average of many numbers, and an occasional large number does not significantly affect the mean.

It is the stock price that determines the direction of the moving average, not the moving average that determines the direction of the stock price. When the stock price rises, the moving average slowly follows; when the stock price falls, the moving average also slowly follows down.

The function of the moving average is to indicate the direction of price movement, belonging to trend indicators. It cannot tell you what will happen in the future, but it tells you what the current trend is. For many people, the moving average is not much better than visually observing the candlestick chart.

Does the moving average represent the average holding cost over a period?

You often hear people say that the 10-day moving average represents the average cost of buyers over those 10 days, but this is inaccurate because it does not consider the volume factor.

If a certain stock had a huge volume on a certain day, it indicates that many people bought it that day; therefore, simply adding the closing prices and calculating the average clearly cannot represent the average holding cost of the buyers.

Some people also say that once the moving averages are intertwined, it requires close attention because a large rise or fall may occur soon. Is this really the case?

In fact, after understanding the essence of moving averages, the intertwining of moving averages is not mysterious at all. As long as the stock price fluctuates in a narrow range for a sufficiently long time, both short-term and long-term moving averages will definitely intertwine. Even if you don't look at the moving averages, you know that the price fluctuations are brewing a trend, and apart from fluctuations, the price can only go up or down.

Some people also say that the intertwining of moving averages indicates that the buying costs of the short and long terms are tending to converge, which is inaccurate because it does not consider the volume factor.

The simple average of stock prices is called the MA moving average, while the moving average used to calculate the MACD indicator is the EMA.

Taking the 26-day moving average as an example, the calculation of a regular moving average (MA) is to sum the closing prices of the last 26 days and calculate the average; each daily closing price has an equal impact on the average calculation.

However, we calculate moving averages to clearly see the trend (actually, it can be seen with the naked eye). The closer the closing price is to the present, the more it should reflect the ongoing trend of the stock price.

Therefore, some people have created the EMA moving average, where the closing prices closer to the present time have greater weight in the calculation of the average.

In fact, I think the difference is not significant. When you try to make the moving average more sensitive to stock price fluctuations, the probability of false signals increases. If some readers do not fully understand, they can simply treat the EMA as a regular moving average.

2. How is MACD derived?
Every software has it; to understand the MACD indicator, you must first grasp the three major elements: DIF, DEA, and the red and green bars.

(1) DIF = 12-day EMA - 26-day EMA.

Most software's default parameters are 12 days and 26 days because previously there were 6 trading days a week, so half a month is 12 days, and a month is 26 days. Now that a week has become 5 trading days, the parameters have gradually formed a habit, and the technical parameters that everyone looks at are often more important.

The absolute value of DIF represents the distance (opening) between the short-term and long-term moving averages.

When the 12-day moving average is above the 26-day moving average, the stock price is in an upward state, and DIF is above the 0 axis; when the 12-day moving average is below the 26-day moving average, the stock price is in a downward state, and DIF is below the 0 axis.

When DIF crosses above the 0 axis, it means the 12-day moving average and the 26-day moving average form a golden cross; when DIF crosses below the 0 axis, it means the 12-day moving average and the 26-day moving average form a death cross.

Is a moving average golden cross a buy signal, and a death cross a sell signal?

We still have to return to the essence of moving averages. Due to the formula for calculating the average, the short-term moving average is more sensitive to changes in stock prices. For example, if the stock price has been 10 yuan for the past 20 days and today it suddenly rises to 11 yuan, then today the 5-day moving average value is 10.2 yuan, and the 10-day moving average value is 10.1 yuan, which in the graph manifests as a golden cross between the 5-day moving average and the 10-day moving average.

If readers still do not understand, they can calculate it themselves and draw a few moving averages for clarity.

So, is the golden cross caused by the short-term stock price rise a buy signal?

Only if the stock price continues to rise in the future does the golden cross become a valid buy signal. If the stock price falls in the future, the golden cross is a false signal. In other words, in a trending market, golden crosses and death crosses are effective buy and sell signals, but in a fluctuating market, they are mostly false signals.

There are many false signals in moving average indicators, but one thing is certain: before a stock price begins to rise, there must be a golden cross of moving averages; before a stock price begins to fall, there must be a death cross of moving averages.

If you buy and sell according to golden cross and death cross signals, can you tolerate the small losses caused by countless false signals? Because we cannot predict whether the future will be a fluctuating market or a trending market.

Next, let's continue talking about DIF.

The greater the absolute value of DIF, the larger the opening between the short-term and long-term moving averages, indicating that the short-term stock price rises or falls at an accelerated rate.

Stock prices cannot only rise without falling, nor can they only fall without rising. Short-term large rises or falls cannot last long-term; stock prices will definitely experience fluctuations or retracements.

Because of this, DIF fluctuates around the zero axis, indicating that MACD has the characteristics of a fluctuating indicator, essentially a repeated demonstration of human greed and fear.

Another frequently mentioned concept is the MACD divergence at the top and bottom.

The following diagram shows two short-term divergences at the top, where the stock price is rising, but DIF is constantly falling, meaning that as the stock price rises, the distance between the two moving averages has not created a new high.

Generally speaking, a divergence at the top during an upward trend indicates that a short-term decline may occur. Because a strong rise should see continuous inflow of market funds, and the stock price rises faster and faster, which is reflected in the short-term moving average and long-term moving average growing further apart.

However, if the distance between the short-term and long-term moving averages is getting smaller, it means that the momentum of the rise is weakening. Although the stock price still appears to be rising, it could start to decline at any time. This is the essence of the MACD top divergence suggesting that the stock price may fall.

Now everyone should understand the essence of the top divergence, but moving averages always represent the past and cannot be used to predict the future. The following diagram is an example of a failed top divergence; after all, the past rising momentum has weakened, and if a positive news appears in the future, it will still rise significantly.

I won't say much about bottom divergence; it is essentially the opposite of top divergence, indicating a weakening of the downward momentum. Similarly, a weakening downward momentum does not necessarily mean that it will not continue to fall.

(2) DEA: The moving average line of the DIF value, generally set as a 9-day moving average by default in software.

Why set a moving average line for DIF?

The moving average is a way of thinking; our naked eyes are not sensitive to numerical fluctuations, but when comparing the current values with the average, we can feel the changes in value more vividly.

Following the same logic as the stock price moving average, DEA is the 9-day average of DIF, which means it is more sluggish to changes in DIF on a daily basis. If DIF crosses above DEA (golden cross), it means the recent DIF is increasing; if DIF crosses below DEA (death cross), it means the recent DIF is decreasing.

When DIF is above the zero axis:

DIF and DEA golden cross means DIF is increasing, which indicates that the distance between the long-term and short-term moving averages is increasing, and the momentum of the stock price is becoming stronger.

DIF and DEA death cross means DIF is decreasing, indicating that the distance between the long-term and short-term moving averages is decreasing, and the momentum of the stock price is currently weakening.

When DIF is below the zero axis:

DIF and DEA golden cross indicates that DIF is negative, meaning that the absolute value of DIF is decreasing, and the distance between the long-term and short-term moving averages is decreasing, indicating that the downward momentum of the stock price is weakening.

DIF and DEA death cross means that DIF is negative, indicating that the absolute value of DIF is increasing, meaning that the distance between the long-term and short-term moving averages is increasing, and the downward momentum of the stock price is getting stronger.

Whether it is the golden cross or death cross of moving averages, or the golden cross or death cross of MACD, they are all descriptions of past price trends. If future price trends continue the characteristics of the past, then the buy and sell signals will be very accurate; but if future price trends do not continue the characteristics of the past, then the buy and sell signals will all be false signals.

In other words, golden crosses and death crosses are trend indicators and are not applicable in fluctuating markets. The key is that only when the stock price has moved out can we look back and know whether the market belongs to fluctuations or trends.

(3) Red and green bars: (DIF - DEA) * 2 is the value of the bars, where red bars are positive values and green bars are negative values.

By this point, many people may begin to feel confused, and it is because the MACD is designed to be quite complex, which leads to most of the external uses being incorrect and based on assumptions.

DIF is the difference between the 12-day moving average and the 26-day moving average, representing the distance (opening) between the short-term and long-term moving averages. The greater the absolute value of DIF, the greater the distance between the short-term and long-term moving averages, which indicates a stronger rise or fall.

The meanings of red and green bars are similar to the principles of DIF. MACD indicates two aggregations and dispersions: one is DIF, which represents the aggregation and dispersion of short-term and long-term moving averages; the other is the MACD red and green bars, which indicate the aggregation and dispersion of DIF and DEA.

By comparing DIF with its average DEA, we can understand the changes in DIF. However, to further observe the momentum of DIF changes, we also need to observe the difference between DIF and DEA.

The values of the red and green bars are the differences between DIF and DEA. The longer the red and green bars, the greater the distance between DIF and DEA, indicating a stronger rise or fall.

Today's article has covered a lot; if I write more, there will be fewer people who can continue reading. One thing to know about the red and green bars is that when a red bar turns into a green bar, it corresponds to the death cross of DIF and DEA; when a green bar turns into a red bar, it corresponds to the golden cross of DIF and DEA.

Finally, let's summarize: Can MACD predict market trends?

No!

MACD is a description of the current stock price trend; experienced traders can also draw the same conclusions from naked candlestick charts. A somewhat inaccurate analogy is that looking directly at the candlestick chart is like a doctor using a stethoscope to listen to your heartbeat, while MACD is the printed electrocardiogram categorizing different heartbeats.

There is a classic story about a 'Russell Chicken': In a farm, there was a chicken that was fed many delicious foods by the farmer every morning at dawn, making it plump. After a few months, one day the farmer came again, but this time he did not feed it; instead, he killed it because it was Thanksgiving.

In trading, some people do not understand the essence of indicators and start summarizing rules based on certain phenomena, ultimately becoming like that chicken that died from inductive reasoning. Remember, when you want to use a certain indicator, first understand how it came about.

This article is not teaching you how to use indicators, but rather dispelling the superstitions.
The root of superstition is ignorance.

Let's encourage each other!