# Moving Averages

> SMA, EMA, and the golden/death cross.

Module: Technical Analysis — Finotaur Academy (free lesson)
Source: https://www.finotaur.com/academy/technical-analysis/moving-averages

## You'll be able to

Calculate a simple and an exponential moving average by hand, choose a period that fits your timeframe, and use averages and crossovers as trend filters rather than buy and sell signals.

## In plain words

A moving average smooths price by averaging the last N closes and updating that average every bar. It turns a noisy chart into a single line that shows the direction and pace of the trend. The price you pay for that smoothness is **lag**: an average always reports what has already happened, so crossovers and turns arrive after the move has started.

```takeaways
- **SMA** = the plain average of the last N closes; **EMA** weights recent closes more, using the multiplier **2 ÷ (N + 1)**.
- Every moving average **lags**; shorter periods react faster but give more false signals.
- The **golden cross** (50-day above 200-day) and **death cross** (50 below 200) are slow trend filters, not timing signals.
- Averages work best in trending markets and whipsaw badly in ranges.
```

## Quick demo

**Computing a 5-period SMA and EMA (hypothetical closes).** Five closes: **20, 21, 22, 21, 23**.

- **SMA(5)** = (20 + 21 + 22 + 21 + 23) ÷ 5 = 107 ÷ 5 = **21.40**.

The next close is **24**.

- New **SMA(5)** drops the oldest close (20) and adds 24: (21 + 22 + 21 + 23 + 24) ÷ 5 = 111 ÷ 5 = **22.20**.
- **EMA(5)**: multiplier k = 2 ÷ (5 + 1) = **0.3333**. Starting from 21.40 (it is common to seed the first EMA with the SMA):
  EMA = previous EMA + k × (close − previous EMA) = 21.40 + 0.3333 × (24 − 21.40) = 21.40 + 0.867 = **22.27**.

The EMA moved slightly further toward the new close than the SMA did (22.27 vs 22.20), because a third of its weight sits on the latest bar. On a longer series, and especially after a sharp move, the gap between the two is much larger.

## Full explanation

### Simple moving average (SMA)

The SMA adds up the last N closes and divides by N. Every close in the window has equal weight, and when a close drops out of the window it vanishes completely. That has a side effect: a big move from N bars ago can make the SMA jump *today* simply because that old bar left the window, not because anything happened today.

On average, the data in an SMA is (N − 1) ÷ 2 bars old. A 20-day SMA is centred about 9.5 days in the past; a 200-day SMA about 99.5 days. That is the lag in plain numbers.

### Exponential moving average (EMA)

The EMA applies the formula from the demo every bar:

- k = 2 ÷ (N + 1)
- EMA today = EMA yesterday + k × (close today − EMA yesterday)

The latest close gets weight k, and older closes fade gradually instead of falling off a cliff. That makes the EMA turn sooner after a change in direction and removes the "drop-off" jump of the SMA.

```chart
{
  "type": "bar",
  "title": "Weight given to the latest close by an EMA, by period",
  "unit": "%",
  "unitPosition": "suffix",
  "data": [["9", 20.0], ["12", 15.38], ["20", 9.52], ["26", 7.41], ["50", 3.92], ["200", 1.0]],
  "highlight": ["12", "26"],
  "notes": { "12": "Used in MACD's fast line.", "26": "Used in MACD's slow line." },
  "caption": "Exact arithmetic: k = 2 ÷ (N + 1). A 9-period EMA puts 20% of its weight on the newest bar; a 200-period EMA about 1%."
}
```

Because an EMA depends on every previous value, two platforms that started their calculation at different points can show slightly different EMA values for the same bar. The difference shrinks as more data is included.

### Choosing a period

There is no correct period, only conventions that many traders watch:

```stats
9 / 10 / 20 | Short-term | Intraday and short swing trend; reacts fast
50 | Medium-term | Common daily-chart reference for the intermediate trend
100 / 200 | Long-term | 200-day widely watched as a long-term trend line
2 ÷ (N + 1) | EMA multiplier | 0.0952 for N = 20
```

Pick periods that match your holding time and keep them fixed. Constantly changing the period until the average "fits" the chart produces averages that describe the past perfectly and help with nothing.

### Four ways traders use moving averages

1. **Trend filter.** Only take longs when price is above a rising 50- or 200-day average, only shorts when below a falling one. This is the most robust use because it requires no precise timing.
2. **Dynamic support and resistance.** In a steady trend, pullbacks often stall near a short or medium average. Treat it as a zone, like any other level.
3. **Crossovers.** A faster average crossing a slower one (for example 9 over 21, or 50 over 200) marks a change in the short-term trend relative to the longer one.
4. **Distance from the average.** When price stretches far above its average, the move may be extended; some mean-reversion traders measure that distance in percentages or standard deviations.

### Golden cross and death cross

The **golden cross** is the 50-day moving average crossing above the 200-day; the **death cross** is the reverse. Because both averages are slow, the cross usually happens well after the price turn. They are better read as statements about the trend regime than as entry signals. Crossover strategies also suffer in sideways markets, where the averages tangle and cross repeatedly with no follow-through.

```warning
Moving-average crossovers produce repeated losing signals in ranging markets — buy, sell, buy, sell — each one a small loss plus costs. Before trading crossovers, check whether the market is actually trending, and expect a run of whipsaws to be a normal part of the method, not a malfunction.
```

### Other variants

- **Weighted moving average (WMA)** — weights decline linearly (N, N−1, …, 1).
- **Hull, Kaufman adaptive and similar averages** — designed to reduce lag or adapt to volatility. They are refinements, not cures: every average still trades off smoothness against delay.

```tip
Put one long average (for example the 200-day) on every daily chart you look at, and write "above" or "below" in your trade notes. Over time you can check whether your trades against the long-term average perform differently from those with it.
```

### A trend-filter plan, worked

A stock trades at **86.00**. Its 200-day SMA is **78.00** and rising; its 20-day EMA is **84.50**. The long-term regime is up, so the trader only looks for longs.

Price pulls back over four days to **84.80**, near the 20-day EMA, and prints a higher low above the previous swing low at **83.20**. Plan:

- Entry: **85.00** as price turns back up.
- Stop: **83.00**, below the swing low — not below the average itself, because the average moves every day while the swing low is a fixed price.
- Risk: **2.00**.
- Target: the recent high at **90.00**, a reward of **5.00**, or **2.5R**.

If price closes below the 200-day SMA at some point, the regime filter switches off long setups entirely, regardless of how attractive any individual pullback looks. The average does not tell the trader when to buy; it tells them which side of the market they are allowed to trade.

### Common mistakes

- **Buying every touch of the average** without checking that the trend is intact.
- **Treating crossovers as precise timing signals** when they are inherently late.
- **Optimising the period on past data** until it fits perfectly.
- **Using averages in a range**, where they whipsaw.
- **Forgetting that SMAs can move because old data dropped out.**

```checklist
title: Moving average routine
- Choose your averages once (for example 20, 50 and 200) and keep them.
- Identify the regime: is price above or below a rising or falling long average?
- Trade in the direction of the long average unless you have a specific reason not to.
- Treat averages as zones for pullback entries, not exact lines.
- Expect crossovers to lag; confirm with structure (higher highs and lows).
- Record whether each trade was with or against the long-term average.
```

```quiz
[
  {
    "q": "Closes: 10, 12, 11, 13, 14. What is the 5-period SMA?",
    "options": ["11.5", "12.0", "12.5", "13.0"],
    "answer": 1,
    "why": "(10 + 12 + 11 + 13 + 14) ÷ 5 = 60 ÷ 5 = 12.0."
  },
  {
    "q": "What is the multiplier for a 19-period EMA?",
    "options": ["0.05", "0.10", "0.19", "0.0526"],
    "answer": 1,
    "why": "k = 2 ÷ (19 + 1) = 2 ÷ 20 = 0.10."
  },
  {
    "q": "Previous EMA is 50.00, k = 0.20, and today's close is 55.00. What is today's EMA?",
    "options": ["51.00", "52.50", "55.00", "50.20"],
    "answer": 0,
    "why": "EMA = 50.00 + 0.20 × (55.00 − 50.00) = 50.00 + 1.00 = 51.00."
  },
  {
    "q": "Why does a golden cross usually happen well after the market's turn?",
    "options": ["Because it uses volume", "Because both the 50- and 200-day averages lag price", "Because it only works on weekly charts", "Because it uses the high, not the close"],
    "answer": 1,
    "why": "Both averages are built from past closes, so they turn and cross only after price has already moved."
  }
]
```
