in chapter 3.7, it mentioned that use Exponential Moving Average to to obtain a smooth curve, and the code of this is:
smoothed_points.append(previous factor + point (1 - factor))
However, it seems that the formula of Exponential Moving Average is:
EMAtoday=α Pricetoday + ( 1 - α ) EMAyesterday
So, if this formula is correct, the code of computing Exponential Moving Average shoule be:
point factor + (1 - factor) previous
Thus, is the code in the book correct or not? And why is the factor = 0.9?
Please give me some help.
in chapter 3.7, it mentioned that use Exponential Moving Average to to obtain a smooth curve, and the code of this is: smoothed_points.append(previous factor + point (1 - factor))
However, it seems that the formula of Exponential Moving Average is: EMAtoday=α Pricetoday + ( 1 - α ) EMAyesterday
So, if this formula is correct, the code of computing Exponential Moving Average shoule be: point factor + (1 - factor) previous
Thus, is the code in the book correct or not? And why is the factor = 0.9? Please give me some help.