Foundations4 min read

Moving Averages: Simple and Exponential

The most used indicator there is. An average of recent closes, redrawn each bar, which converts a jagged series into a slope.

MadStockAlerts Research · Updated August 28, 2026

What to take away

  • A simple moving average weights every period equally; an exponential moving average weights recent periods more.
  • The period chosen determines the horizon being described, and nothing else.
  • Averages describe trend well and are worse than useless in a sideways range.
  • Widely watched periods matter partly because they are widely watched.
  • Price distance from an average measures stretch against that security's own history.

MAD Academy Training Video · 0:43

The Average Is Always Late — On Purpose

Lag is not a defect in a moving average. It is the feature you are paying for, and knowing the price of it is the whole skill.

This lesson is part of a Stock Alerts + Tools plan.

See the library

The calculation

SMA(n) = (C1 + C2 + ... + Cn) / n

  • C is the closing price of each of the last n periods

Each bar the oldest close drops out and the newest enters, which is what makes it move. A consequence worth knowing is that a simple moving average can turn because of what left the window rather than what entered it: a very large bar rolling off the back end moves the line with no new information at all.

An exponential moving average applies a decay so that recent closes count for more and older ones fade rather than drop off. It turns sooner than a simple average of the same length and, for the same reason, changes direction more often.

EMA today = (close today x k) + (EMA yesterday x (1 - k)), where k = 2 / (n + 1)

Choosing a period

PeriodConventional use
9 / 10Very short-term momentum; used heavily on intraday charts
20 / 21About a month of trading; the common short-term trend reference
50The medium-term trend on a daily chart
100An intermediate reference between the 50 and the 200
200The long-term trend, and the most widely watched line in equities

There is nothing mathematically special about 50 or 200. They matter because enough participants watch them that behaviour clusters around them, which makes them partly self-reinforcing rather than predictive.

The self-reinforcement is real but limited. A level that many people watch attracts orders, and orders are supply and demand. It does not follow that price must respect the level, only that more decisions are being made near it than elsewhere.

What they describe well

  • Direction: a rising average means the recent window is higher than the one before it.
  • Structure: price consistently above a rising average is what an uptrend looks like numerically.
  • Reference levels: pullbacks in strong trends frequently stall near widely watched averages.
  • Separation: price far above its average is stretched relative to its own recent history.
  • Agreement: several averages of different lengths sloping the same way describes a trend at several horizons at once.

The separation reading is the one most often underused. Expressing the gap between price and an average as a percentage turns a visual impression into a comparable number, and shows when a security is further from its own trend than it usually gets.

Where they fail

In a sideways range a moving average sits in the middle of the noise and crosses price constantly. Every crossing looks like a change of trend and none of them is. This is the single largest source of losses from mechanical moving-average systems, and it is inherent rather than fixable by parameter choice.

The same average in a trend, then in a range
The same average in a trend, then in a range38.044.050.056.061.9RangeVolumePullbacks hold the average and thetrend resumesNow it cuts through price on everyswing

Scroll the chart sideways to see all of it.

  • SMA 20
  • SMA 10
One 20-period average across both halves. Left of the marker it is a reference the pullbacks respect; right of it, price crosses it repeatedly and every crossing means nothing. Illustrative, not live data.

The usual mitigation is not a better average but a filter that decides whether a trend exists at all before the average is consulted, which is the job ADX is normally given.

An idealised trend with a rising average acting as the reference for successive pullbacks. A teaching diagram, not live data.

The variants, and what each trades away

Every moving average is a compromise between responsiveness and stability, and the variants differ only in how they weight the past. None of them removes the compromise; they move along it.

TypeWeightingCharacter
SimpleEqual across the windowStable. A single large bar leaving the window moves it
ExponentialDecaying, most weight on the newestFaster to respond, and noisier
WeightedLinearly decayingBetween the two, and rarely used
Hull and similarComposite, tuned for lag reductionFaster still, at the cost of overshoot
Volume-weightedBy volume rather than by timeReflects where trading happened, not just when

The first row contains an effect that is easy to miss. A simple moving average changes when a bar drops out of the back of the window, which means the line can move sharply on a day when nothing much happened, because of what occurred exactly one window ago.

No smoothing method can be both fast and stable, because the two properties are the same trade-off viewed from either end. A variant advertised as removing lag has removed stability instead.

Educational content only. MadStockAlerts provides market commentary, research, and educational content. It is not personalized investment advice, and nothing here is a recommendation to buy or sell any security. Trading and investing involve substantial risk, including loss of capital. See the Risk Disclosure and Customer Agreement.