Indicators Deep Dive~12 min+30 XP

Moving Averages (SMA & EMA)

Your first indicator

Everything so far — candles, trends, support and resistance — has been price action. You read the chart directly. A moving average (MA) is your first step into indicators: a number computed from price that gets plotted on top of the chart to tell you something price alone didn't show obviously.

Moving averages are the oldest and dumbest indicator in the book. They're also the foundation of MACD, Bollinger Bands, ADX, and most trend-following systems. Get this one right and the rest fall into place.

Kaufman's canonical definition:

The most well-known of all smoothing techniques, used to remove market noise and find the direction of prices, is the moving average. — Trading Systems and Methods

The three forms you need to know:

SMA — Simple Moving Average

textSMAt=fracCt+Ct1+ldots+CtN+1N\\text{SMA}_t = \\frac{C_t + C_{t-1} + \\ldots + C_{t-N+1}}{N}

The arithmetic mean of the last N closes. Every bar gets equal weight. Murphy's plain-English recipe, unchanged since 1986: "if a 10-day average of closing prices is desired, the prices for the last 10 days are added up and the total is divided by 10. Each day the new close is added to the total and the close 11 days back is subtracted."

WMA — Weighted Moving Average

textWMAt=fracsumi=1NicdotCtN+isumi=1Ni=fracsumi=1NicdotCtN+iN(N+1)/2\\text{WMA}_t = \\frac{\\sum_{i=1}^{N} i \\cdot C_{t-N+i}}{\\sum_{i=1}^{N} i} = \\frac{\\sum_{i=1}^{N} i \\cdot C_{t-N+i}}{N(N+1)/2}

Newest bar weight NN, oldest weight $1.Themostrecentbarcounts. The most recent bar counts N times more than the oldest bar. Murphy's concrete 10-day WMA: multiply today's close by 10, yesterday's by 9, and so on, then divide by \10 + 9 + \ldots + 1 = 55$.

EMA — Exponential Moving Average

textEMAt=alphacdotCt+(1alpha)cdottextEMAt1\\text{EMA}_t = \\alpha \\cdot C_t + (1-\\alpha) \\cdot \\text{EMA}_{t-1}

with

alpha=frac2N+1\\alpha = \\frac{2}{N+1}

Today's EMA is a blend of today's close and yesterday's EMA. The weight α on today's close is fixed at $2/(N+1).For. For N=10,, \alpha \approx 0.18$ — today gets 18% of the weight, yesterday's EMA gets 82%, and the weight of each older bar decays geometrically. Old bars never "fall off" suddenly the way SMA bars do.

A useful intuition from Kaufman: "visualizing the effect of the smoothing process as moving the exponential trendline closer to the current price by [α] of the distance between the price and the previous trendline value." Each bar drags the line α closer to the new close — so bigger α (smaller N) = more reactive line.

Play with it

Market
Overlays
A 20-period moving average lags the price by roughly 10 bars(Kaufman's rule of thumb: lag ≈ N/2). Crank Period up — the line smooths, but signals come in later. Turn it down — the line hugs price, but every wiggle triggers a signal. Switch the market to sideways: notice how all three MAs just wander in the middle of the range, useless. That single observation is what Murphy calls the MA's fatal flaw: it works in trends and dies in ranges.

Three knobs to turn:

  • Market: up / sideways / down.
  • Period N: how many bars to smooth over.
  • Which MAs to show: SMA (blue), EMA (orange), WMA (amber).

Observations that reliably hold:

  • All three MAs track the same general shape. The differences show up at turns.
  • On a fresh turn, EMA reacts first, then WMA, then SMA. The longer your period, the more extreme the gap.
  • Increase N from 10 to 50 to 100: the line gets smoother, but signals arrive later. This is the whole game.
  • Flip the market to sideways — all three MAs just wander through the middle of the range. They work in trends and die in ranges. Remember this, because beginners usually don't.

The lag/smoothing tradeoff

This is the central tradeoff of every indicator ever written. Kaufman makes it concrete:

If a 200-day trend were used, then there would be a lag of 100 days. — Trading Systems and Methods

Rule of thumb: an N-period MA lags price by about N/2 bars. A 20-day MA is roughly 10 days behind the "true" trend. A 200-day MA is 100 days behind — which is why a big institutional investor asking "is SPY above its 200-day?" is asking a deeply lagged question, and is fine with that because they're operating at 6–12 month horizons.

Murphy's one-liner is the best summary you'll find anywhere:

The moving average is a follower, not a leader. It never anticipates; it only reacts. — Technical Analysis of the Financial Markets

If you want faster signals you must accept more noise. If you want cleaner signals you must accept more lag. There is no setting of N that gives you both. Systems that appear to solve this — Kaufman's own Adaptive Moving Average (KAMA), Jurik MA, Hull MA — solve it only by varying N with market conditions, i.e. by admitting that fixed N was the problem.

Crossovers

The most famous use of MAs is the crossover: plot two MAs of different periods, and take a signal when the fast one crosses the slow one.

  • Fast crosses above slow → bullish signal (the popular media call this a golden cross, though Murphy and Kaufman do not)
  • Fast crosses below slow → bearish signal (death cross in the media, again not the textbook term)

Classical combinations Murphy names:

FastSlowUse
520Short-term futures
1050Stock traders
50200The stock-market benchmark everyone quotes
4, 9, 18(triple)R.C. Allen's 1972 system

The 50/200 pair has become a kind of cultural ritual on financial TV. Kaufman is dry about it: "the 200-day moving average is shown as the key technical indicator on most financial networks, but 50 and 100 days are equally popular."

The whipsaw

Now the honest reality — watch what happens to the same crossover system in different markets:

Market
Signals2
Wins1
Losses0
Win rate100%
Each arrow is a close-to-close trade between consecutive crossovers. Switch to sideways and notice the win rate collapses — this is the whipsaw. Kaufman tested 127 parameter combinations across 27 years of futures data; across most markets, only ~5–8% of the combinations were profitable.

Default: sideways market, EMA(10) vs EMA(30). Count the signals. Count the winners. Now switch to a trending market — same parameters — and count again.

This is the whipsaw, and Murphy called the shot forty years ago:

Because they are trend-following in nature, moving averages work best when markets are in a trending period. They perform very poorly when markets get choppy and trade sideways for a period of time. And that might be a third to a half of the time. — Technical Analysis of the Financial Markets

That's half of all trading hours. A crossover system applied naively bleeds money during ranges and makes it all back (plus more) during trends. If you can't identify which regime you're in — which is the entire content of the previous lesson on trends — you cannot use this system profitably.

Kaufman's own 2017 testing, across 15 futures markets from 1990–2017, tried 127 different combinations of fast and slow periods. In most markets, only 5–8% of the parameter combinations produced profit. Let that sink in: over 90% of the "reasonable" crossover systems you could design lose money over 27 years, including commission. The 5–8% that work are not universally the same across markets.

Translation: MA crossover is not a system. It's a primitive you can use in a system that already has another way of knowing whether to be trading at all.

The MA as dynamic S/R

The last use worth knowing — and the one that requires no trading decision to learn from — is treating the MA line as dynamic support or resistance, same as any horizontal S/R zone.

The 40-week moving average should provide support during bull market corrections. — Murphy

In a strong uptrend, the 20-day or 50-day EMA is often where pullbacks stop. Traders watch for price to touch the MA, wick through slightly, and resume upward — which is the same role-reversal pattern you learned for horizontal S/R, just drawn diagonally. When that bounce fails — when price closes decisively through the MA after a long-tested uptrend — the change is meaningful.

Practical rule: the MA acts as dynamic S/R in trends and is useless in ranges. Same conditional as crossovers.

Hidden traps

A few things neither the textbooks nor the tutorials usually make explicit:

  1. Different MAs of the same N disagree about when the "trend" changes. In Kaufman's tests, an 18-day, 20-day, and 21-day MA will often signal on different bars — sometimes by a full week. If your decision depends on crossing exactly the 20-day, you're fooling yourself about precision.
  2. EMA is not strictly better than SMA — Murphy is blunt: "there's no real evidence to prove that they work any better than the simple average." The 2/(N+1) mapping is a convention, not a performance guarantee.
  3. Live MA values keep changing. A 50-day SMA today will be a different 50-day SMA tomorrow — not because the indicator is unreliable but because the window slid. Systems that "rebuild" on restart can produce signals that didn't exist when you were watching live. Always commit entries/exits to a log.
  4. Origin. Neither Kaufman nor Murphy names the inventor of the moving average. Kaufman credits World War II engineering for exponential smoothing (it came out of radar tracking) and Richard Donchian (1960s, Hayden Stone) as the first to systematize MA trading rules. The indicator predates its trading use by decades.

Quick check

Question 1 / 40 correct

You fit a 40-day SMA to a daily chart. Approximately how many bars does the MA lag the 'true' price trend?

What you now know

  • An MA is a smoother, not a predictor. Three forms — SMA (equal weights), WMA (linear), EMA (exponential) — each trading different things for different things.
  • EMA's α = 2/(N+1) is a convention, not a guarantee of better performance.
  • Lag ≈ N/2 bars. A 200-day MA is 100 days behind the market. That's not a defect — it's the definition.
  • Crossovers are named combinations (5/20, 10/50, 50/200) — but calling them "golden/death cross" is media flavor, not textbook nomenclature.
  • MA crossover is not a trading system. It's a primitive. Naively applied, it loses money over ~92% of reasonable parameter choices across 27 years of futures data (Kaufman). It works when paired with a regime filter.
  • In strong trends, the MA acts as dynamic support/resistance — the role-reversal lesson, rotated diagonally.

Next: RSI. Where the moving average is a smoother, RSI tries to measure the speed of the move itself — and makes claims about when a trend is "overbought." Most of those claims turn out to be wrong; the interesting behavior is called divergence.

Press complete when you're done.
Back to tree