Skip to content
Wildflower
Join free
Indicators

Free Trading School · Level 2 · Course 2.4

Simple moving average

Lesson 5 of 99 in IndicatorsModule 2: Moving averages

Reading the market · Indicators

Simple moving average

Wildflower Trading School · Lesson 2.4.2.1

Wildflower

The simple moving average is one of the most common indicators there is, and you've already built a small one by hand. By the end of this lesson, you'll know exactly how it's worked out, and why it moves. You'll know why it smooths out the bumps, and what its length really means in time.

1 of 7

What you'll learn

  • Work out a simple average. Add up the last N closes and divide by N.
  • Slide the window. Each new close pushes the oldest out. Join the points.
  • See how it smooths. One odd close moves a long average less than a short one.
  • Turn length into time. N counts candles. A 20 on a daily chart covers about a month.
  • Check it by hand. Average the last 5 closes and compare with the line.

Exercise

  1. On a 5-minute MES1! chart, on TradingView or any platform, add a 5-candle simple moving average.
  2. Write down the last 5 closed candles' closes, work out their average by hand, and check it against the line.

Quick check

  1. 1. Closes of 5,000, 5,004 and 5,008. What is the 3-candle simple moving average?

  2. 2. One close jumps 12 points out of line. How far does a 20-candle simple average move?

  3. 3. A 20-candle average on a 5-minute chart covers how much time?

0 of 3 answered.

Finished this lesson?

Tick it off and keep your place

Make a free account and we'll remember where you are, so “Exponential moving average” is waiting next time.

Read the full notes

A simple moving average adds up the last N closes and divides by N, worked out again on every candle, so one unusual close only moves it by a fraction.

  1. Add up the last N closes. N is the length.
  2. Divide by N, and draw the answer on the newest .
  3. When a new candle closes, the oldest close drops out of the window.
  4. Repeat on every candle and join the points.
  • A counts every close in the window the same. The answer needn't land on a : it's an average, not a price that traded.
  • It smooths: a close 10 points out of line moves a 5-candle average 2 points and a 20-candle average half a point. When that close drops out, the line moves again.
  • N counts candles, not time. A 20-candle average covers 20 minutes on a 1-minute chart, 100 minutes on a 5-minute chart and about a month on a daily chart. See Timeframes.
  • More on how the two main kinds differ: EMA vs SMA.

Worked example

Made-up numbers

A 5-candle average, by hand

Made-up numbers · · closes 5,002, 5,006, 5,004, 5,010, 5,008, then 5,014

  1. 5,002 + 5,006 + 5,004 + 5,010 + 5,008 = 25,030
  2. 25,030 ÷ 5 = 5,006
  3. Next candle: drop 5,002, add 5,014. 25,042 ÷ 5 = 5,008.4

Each new close slides the window one candle; join the points and you have the line.

Your turn

Drill

Five closes: 5,010 · 5,012 · 5,011 · 5,013 · 5,014

Trading is risky. You can lose money. This lesson explains how trading works. It isn't advice.