Trading

Moving Averages Explained: SMA, EMA, and Their Limits

Understand SMA and EMA calculations, chart settings, trend filters, and why moving-average signals need realistic testing.

A moving average compresses a sequence of prices into a smoother line. It can make a chart easier to describe: price has been rising, falling, or moving sideways relative to its recent history. That description is useful, but it does not tell you what tomorrow will bring. Moving averages summarize past prices, and changing their settings does not remove that limitation.

The practical question is what job the line performs in a trading process. A trend filter, a reference for measuring distance, and an exit rule are different jobs. Choose one before adding several averages to the same chart.

How SMA and EMA differ

A simple moving average, or SMA, gives equal weight to each observation in its window. An exponential moving average, or EMA, gives more weight to recent observations while retaining a diminishing contribution from older data. Fidelity's indicator guides describe the resulting tradeoff: an EMA generally reacts faster, while either average introduces delay.

In a hypothetical five-close example, prices of 20, 21, 22, 21, and 26 produce an SMA of 22. If the next close is 25, the oldest value drops out and the new SMA becomes 23. A rising average can therefore reflect both a new observation entering and an old one leaving the window.

The familiar EMA update uses a smoothing weight of 2 divided by the period length plus 1. For a hypothetical nine-period EMA, that weight is 0.2. If the previous EMA is 100 and the next close is 105, the updated value is 101. Different initialization methods can create small discrepancies near the beginning of a chart.

Set the chart before interpreting the line

A 20-period average means twenty bars. On a daily chart, those are daily observations; on a five-minute chart, they are five-minute observations. The same period number describes different amounts of market activity. Extended-hours settings, missing bars, and adjusted historical prices can also change the result.

Write down the symbol, bar interval, trading session, price input, average type, and length. These details sound administrative until two screenshots show different signals. Recording them makes comparisons reproducible and prevents a settings mismatch from looking like a strategy discovery.

There is no universally best length. A shorter window responds to smaller changes but can create more reversals around the line. A longer window can stay steady through those changes while responding later to a genuine shift. Select a length that suits the question and evaluate nearby alternatives without searching endlessly for the prettiest chart.

Turn an observation into a testable rule

Consider a hypothetical research rule: label the daily trend positive when the close is above its 20-day SMA and that SMA is higher than it was five sessions earlier. This is a precise description of historical conditions. It is not a complete entry system or a claim that those conditions predict profitable trades.

To test a strategy using that filter, specify the entry event separately. Also define when the signal becomes known, the earliest executable order, the exit, position size, and costs. A signal calculated with today's final close cannot automatically receive a fill at that same close. The order timing must match information actually available then.

Crossovers need the same treatment. Two averages crossing tells you their relative values have changed. In a range, repeated crossings can generate a string of small losses and transaction costs. Adding more averages derived from the same prices may duplicate information rather than provide independent confirmation.

Use examples that can fail

Suppose price closes at 52 while its average is 50. It is tempting to call the difference bullish. But price might have jumped on news and now offer an unattractive entry relative to an exit level. The average does not tell you the spread, available liquidity, or how much you could lose.

Inspect charts where the filter failed as carefully as those where it worked. Keep a record of late entries, rapid reversals, and long periods without signals. Compare results with and without the filter using the same trades, cost assumptions, and evaluation period. If the apparent improvement depends on one exceptional move, the evidence is fragile.

A useful role for a simple line

Moving averages are easiest to use when they answer one modest question consistently. They can organize observations and make rules easier to communicate. They cannot identify hidden institutional orders, guarantee support, or make execution risk disappear. Begin with one documented purpose, then keep the line only if it improves the process you can actually evaluate.

Sources and further reading