Skip to content
Pipstone Learn

What a moving average is

Lesson 5.1 Free

What a moving average is

A moving average is the average closing price of the last few candles, redrawn after every candle. It smooths out the noise, but it always runs behind price. The period and the type (simple or exponential) decide how far behind.

In this lesson you learn what a moving average is, work one out by hand from real EURUSD closes, see how a simple average (MA) differs from an exponential one (EMA), and see why every moving average runs behind price.

  1. 1 An average that moves

    A moving average is the average closing price of the last few candles. After every new candle, the oldest close drops out, the newest close comes in, and the average is worked out again. Join those averages up and you get a smooth line drawn through the candles.

    The number of candles it uses is the period. A 20-period average on a D1 chart is the average of the last 20 daily closes. On an H4 chart it is the last 20 four-hour closes.

    A moving average is not a forecast. It only describes where price has been on average.

  2. 2 Working it out by hand: a 5-day average

    EURUSD D1 daily closes for the week of 2 to 6 June 2025:

    DayClose
    Mon 2 June1.14419
    Tue 3 June1.13699
    Wed 4 June1.14144
    Thu 5 June1.14444
    Fri 6 June1.13935

    Add them up: 1.14419 + 1.13699 + 1.14144 + 1.14444 + 1.13935 = 5.70641. Divide by 5: 5.70641 ÷ 5 = 1.14128 (rounded to 5 decimals).

    That is the 5-period simple average on 6 June. On Monday 9 June the 2 June close drops out, the 9 June close comes in, and the sum is divided by 5 again.

    Quick check

    1. Question 1 · Calculation

      EURUSD D1 closes, 2 to 6 June 2025: 1.14419, 1.13699, 1.14144, 1.14444, 1.13935. What is the 5-period simple moving average on 6 June? Give 4 decimals.

  3. 3 Simple (MA) and exponential (EMA)

    There are two common types.

    • Simple moving average. Every close in the period counts the same. In a 20-period simple average each close is 1 ÷ 20 = 5% of the result. In the Pipstone terminal the simple average is the indicator called MA.
    • Exponential moving average (EMA). Recent closes count more than old ones. The newest close gets a weight of 2 ÷ (period + 1). For a 20 EMA that is 2 ÷ 21 = 0.0952, about 9.5%, nearly twice the weight the simple average gives it. Older closes fade out gradually instead of dropping off all at once.

    Because the newest close counts more, an EMA turns sooner than a simple average with the same period. A shorter period also turns sooner than a longer one, whatever the type.

    Quick check

    1. Question 2 · Calculation

      An EMA gives the newest close a weight of 2 ÷ (period + 1). What weight, in percent, does a 20 EMA give the newest close? Give 1 decimal.

  4. 4 Why every moving average lags

    An average of past closes can only catch up with price after price has moved. That delay is called lag.

    A real example. From 2 to 11 April 2025, EURUSD D1 jumped from a close of 1.08490 to a close of 1.13554, about 506 pips in seven trading days. On the close of 11 April:

    • MA 20 was about 1.0905, roughly 450 pips below price.
    • EMA 20 was about 1.0935, roughly 420 pips below price.
    • EMA 50 was about 1.0777, roughly 578 pips below price.

    All three were far behind. The EMA 20 was closest, the EMA 50 furthest. The longer the period, the smoother the line and the bigger the lag. There is no setting with no lag: smoothness and speed are a trade-off.

    EURUSD D1 chart up to 11 April 2025 with MA 20, EMA 20 and EMA 50, as described in "Why every moving average lags".
    EURUSD D1 chart up to 11 April 2025 with MA 20, EMA 20 and EMA 50, as described in "Why every moving average lags".
    Open this in the terminal (opens in a new tab)

    Quick check

    1. Question 3 · Multiple choice

      Why does every moving average lag behind price?
  5. 5 In the terminal: add MA 20 and EMA 50

    On your practice account:

    1. Open EURUSD on the D1 chart.
    2. From the indicator menu, add MA with a period of 20 (the simple average).
    3. Add EMA with a period of 50.
    4. Scroll back to March and April 2025 and watch the two lines while price jumps in early April.

    You will see two lines that follow price, both trailing behind it. Look at which line bends first after price changes direction, and which one stays closer to the candles. Then answer the check question below.

    EURUSD D1 chart up to 30 April 2025 with MA 20 and EMA 50, as described in "In the terminal: add MA 20 and EMA 50".
    EURUSD D1 chart up to 30 April 2025 with MA 20 and EMA 50, as described in "In the terminal: add MA 20 and EMA 50".
    Open this in the terminal (opens in a new tab)

    Check your understanding

    1. Question 4 · Multiple choice

      You have MA 20 and EMA 50 on the same EURUSD D1 chart. When price changes direction, which line usually reacts faster?

0 of 4 questions right. Answer them all to complete the lesson.