https://medium.com/@empojg/bitcoin-chart-with-moving-average-indicators-sma-wma-ema-and-macd-fd8601ecb01d

There are three “Moving average” indicators. SMA(simple moving average), WMA(weighted moving average) and EMA(exponential moving average). These three moving average are made to remove the uncertainty of price fluctuation in a short period of time.

SMA is the arithmetic average line of prices in a period of time that created by connections of the average of prices. For example, to calculate the moving average for six days, you can add up the closed prices of last six days which, includes today, and divide them by six.

WMA line is weighted average line that focuses more weight on closer days. For example, if A, B, C, D, E, F each is price change in six days the calculation will be “{A+(B*2) +(C*3) +(D*4) +(E*5) +(F*6)} / 6 “

In the case of SMA, the problem is that SMA used same weight for the calculation regardless of days, and WMA has used to supplement SMA.

However, a problem has been pointed out that WMA’s calculation does not include the price before the calculated date(for example, 6 days)

EMA(exponential moving average)

EMA can calculate the days before the calculated date.

calculation:

SMA(6)=(6days + 5 days before + 4 days before + 3 days before + 2 days before + 6 days before)

EMA(6)=(6days agoEMA+4days agoEMA+4days agoEMA+2days agoEMA+1EMA*2)/7

I multiplied the price by two, so I’ll divide it by seven.

Or, you can calculate as follows:

EMA1=data1

Emart=α×dat+ (1-α)×EMAt-1EMAt=α×dat+ (1-α)×EMAt-1

(α=2/n+1)

data_t is the input data at point t.

Many traders use the 5 days, 20 days, 60 days, and 120 days moving average line.

The moving average line is used as a component of indicator called the Golden Cross.

For example, five days of EMA, which is sensitive to recent movements, is called as golden cross, if it climbs through the twenty days of EMA. Many people use golden cross to capture a “buy” signal.

MACD(Moving Average Convergence Divergence)

MACD is an indicator to find the change of relationship in EMA. MACD uses EMA because SMA is less sensitive than EMA.

If the black signal line crosses the red line, it is “buy” signal. However, if it breaks down, many people use it as a sign of selling.

MACD is an indicator calculated by subtracting the 9 days of EMA from the difference between the short-term 12 days of EMA and the long-term 26 days of EMA.

The Bitcoin chart with the recent MACD can be seen to have some degree of accuracy(blue). On the other hand, we can see that there is also some inaccuracy and ambiguity(yellow).

You can set MACD and EMA on most charts. Indicators are not 100% accurate. Please consider it just as reference.