Moving Average
Moving average is the average of prices over a specified number of periods. It is a smoothed correlation between currency rates and time periods. The time period of any moving average defines how much it will be smoothed. For example, when a Moving Average is calculated by adding the closing prices for the last 5 bars, then it is defined as a 5-period MA.
Simple Moving Average — SMA:
SMA = (P1+P2+P3+….+Pn) / n
P= Price — price of i-bar. Usually closing prices are used.
n — MA period. This is a number of bars on which the indicator is calculated.
The main disadvantage of SMA is that it counts the price twice, when it is received and when it leaves the area of calculation. That is why improved variants of the indicator should be better used.
Weighted Moving Average (WMA):
WMA = (w1*P1+w2*P2+w3*P3+….+wn*Pn) / (w1+w2+w3+…+wn)
wi — the so called weight or coefficient which is assigned to every price. The closer the price to today the larger coefficient is assigned.
Exponential Moving Average (EMA):
EMA(t) = EMA(t — 1) + (K x [Price(t) — EMA(t — 1)],
where t — current time period (current bar),
t — 1 — previous time period (previous bar),
K = 2 / (n + 1),
n — EMA period.
The main advantage of the Exponential Moving Average (EMA) is that it discounts both prices of the previous and current periods. Every subsequent value becomes more significant.
MA length is better to choose for every specific instrument on which you trade and for every specific chart scale.
Some traders believe that it is better to use Fibonacci figures.
For example, the following ones.
Recommended MA periods
| Prices chart | MA periods |
| 5-day | 8, 13, 21 |
| 1-day | 8, 13, 21, 55, 89 |
| 4-hour | 8, 34, 55, 89 |
| 1-hour | 8, 34, 55, 89 |
| 15 min | 34, 55, 144 |
How to analyze Moving Averages:
If the price line crosses the Moving Average line from below, then this is a signal to buy. If it crosses from above, then it is time to sell.