QBMFX Academy

Simple and Exponential Moving Averages

By QBMFX Academy · Updated · Editorial standards

A simple moving average gives equal weight to prices in its lookback window. An exponential moving average gives progressively more weight to recent observations. Both smooth historical data and therefore lag turning points.

How it works

An n-period SMA is the sum of the last n values divided by n. A conventional EMA uses α=2/(n+1) and EMA_today=α×price_today+(1−α)×EMA_previous. Initialization can differ between platforms, so compare the same input series and warm-up history before treating discrepancies as bugs.

Worked example

For closes 10, 12 and 14, the three-period SMA is 12. If a three-period EMA was previously 12 and the new close is 16, α=0.5 and the new EMA is 0.5×16+0.5×12=14. A close above either average only locates the price relative to past observations; it does not imply a profitable entry.

Amounts, prices and scenarios are fictional teaching examples. They exclude any effects not explicitly stated and are not trade recommendations.

Limits and common mistakes

Crossovers can repeatedly reverse in sideways markets. Different lookbacks can produce opposite signals without either calculation being incorrect. Include turnover, execution timing and transaction costs in any strategy test.

Knowledge check

Does an EMA eliminate lag?

Read the explanation

No. It changes the weighting and responds faster to recent prices for a comparable period, but remains a transformation of historical observations.

References and further reading

These sources explain the underlying concepts and specifications. They do not endorse QBMFX Academy. Check the relevant market, protocol version and reporting rules before applying an example.