

But do not worry, as this approximation formula is used in most trading systems.Īnother thing to point out that as a result of the recursive nature of the formula, and the multiplying of the (1 – smoothing factor) with the previous EMA value, the weight of the previous EMA value decreases the more we go into the past. If you would like to calculate the factor’s value to the 100th decimal point as a scientist, then yo will need to perform a much more complicated calculation which you could find in scientific textbooks. Please also note that this formula is an approximation of the value of the EMA. Notice that the number will always be less than 1. If you would like to calculate the value of the factor for a 21 day EMA, then the calculation would be as follows: This is also called the Smoothing Factor in this formula. Remember when we mentioned that the EMA uses a weighting factor. Now let us go through the calculation algorithm step by step in order to explain how the EMA is calculated. For example, if you are using the daily chart, and you decide to calculate the 21 day EMA, then the number of time periods in the calculation is 21. The more time periods you use, the better the signals that are emitted from the indicator are. When calculating the EMA, you will need to decide how many time periods you will use. Smoothing Factor = 2 / (Number of time periods + 1)

Let us start by displaying the general formula of the EMA calculation.ĮMA (Last time period) = Value(Now) x Smoothing Factor + (1 – Smoothing factor) x EMA (Previous period)ĮMA (First Time Period) = Value (First time period) We will discuss the EMA calculation in step by step in order to make things as simple as possible. This means that the value of the EMA of a candle depends on the value of the EMA calculation of the previous candle and so on. One of the obstacles that might make it difficult to understand how the calculation is done is that the EMA is calculated recursively.

Let us now get into the details of calculating the EMA.
EMA FORMULA HOW TO
How to calculate the Exponential Moving Average In the EMA calculation, this factor decreases exponentially the further it goes in the past. The weighting factor is a factor that is multiplied to each of the values in the calculation. This is usually done using a weighting factor. Which means that unlike a simple moving average where the values of the far past have the same weight in the calculation as more recent values, a weighted moving average gives greater significance to more recent values than older one. The Exponential Moving Average (EMA) is a weighted moving average. Why is the Exponential Moving Average called “Exponential”
