Simple moving average
The simple moving average adds up the last closes and divides by how many there are. Every close in the window counts the same.
- Level 3 Reading Charts
- Lição 26 de 31
- 4 min de leitura
- 2 perguntas
A simple moving average, or SMA, is the plain average of the closing prices over a chosen number of periods. A 5-period SMA adds the last five closes and divides by five. Each close in the window has the same weight, and a close leaves the calculation completely once it is more than five periods old.
The calculation
The first five closes in the figure are 1.0976, 1.0968, 1.0972, 1.0960 and 1.0950. Their sum is 5.4826. Divided by five, that is 1.09652, the first point of the line. It is drawn on the fifth candle, because five closes are needed before the average exists.
Rolling forward
The sixth close is 1.0954. The window now holds closes two to six: 1.0976 drops out and 1.0954 comes in. There is a shortcut for the new value.
new SMA = old SMA + (new close − dropped close) ÷ period
That gives 1.09652 + (1.0954 − 1.0976) ÷ 5, which is 1.09608.
| Candle | Close | Leaves the window | 5-period SMA |
|---|---|---|---|
| 5 | 1.0950 | 1.09652 | |
| 6 | 1.0954 | 1.0976 | 1.09608 |
| 7 | 1.0942 | 1.0968 | 1.09556 |
The sixth close was higher than the fifth, and the average still fell. The close that left the window, 1.0976, was higher than the one that entered. An SMA responds to what leaves as well as to what arrives.
Period and weight
In a 5-period SMA each close is 20% of the average. In a 50-period SMA each close is 2%, and in a 200-period SMA it is 0.5%. That is why long averages barely move from one day to the next.
Strengths and weaknesses
| Strength | Weakness |
|---|---|
| Simple to work out and the same on every platform | Slow to react to a change in price |
| Smooth, so it is not thrown by one odd candle | Jumps when an old extreme close drops out of the window |
| The 50, 100 and 200 SMAs are widely watched | Treats the oldest close in the window the same as the newest |
Key points
- An SMA is the sum of the last closes divided by their number.
- In the example the first five closes average 1.09652.
- Each new close replaces the oldest: new SMA = old SMA + (new close − dropped close) ÷ period.
- Every close in the window has equal weight: 20% each in a 5-period SMA and 0.5% in a 200-period one.
Verificação rápida
Estas perguntas não contam para a pontuação do questionário.
Common mistakes
- Reading every move in an SMA as today’s news. Part of each change comes from the old close that has just left the window.
- Using a very short SMA to smooth a noisy chart. Three or four closes are too few to smooth anything.
- Expecting two brokers to show identical values on daily charts. Their daily candles can close at different times, which changes the closes being averaged.
Another example
Four closes of GBP/USD are 1.2500, 1.2520, 1.2510 and 1.2530. They add up to 5.0060, so the 4-period SMA is 1.2515. The next candle closes at 1.2530 again, unchanged from the one before. The window now holds 1.2520, 1.2510, 1.2530 and 1.2530, and the SMA is 1.25225. The average rose 7.5 pips on a candle where the close did not move at all, because the low close of 1.2500 dropped out.
Questions people ask
How do you calculate a simple moving average?
Add the closing prices of the last so many periods and divide by that number. For a 10-period SMA, add the last ten closes and divide by ten. When a new candle closes, drop the oldest close, add the newest and divide again.
What is a 200-day moving average?
It is the simple average of the last 200 daily closes, which is about 40 weeks of trading. It changes very slowly and is widely used as a line between a long-term uptrend, with price above it, and a long-term downtrend, with price below.
Why does my moving average change when nothing happened today?
Because an old close has left the window. An SMA is the average of a fixed number of closes, so each new candle pushes the oldest one out. If that old close was unusually high or low, the average shifts even when the newest candle is flat.
Is a longer moving average better?
It is smoother and slower, which suits some jobs and not others. A long average is less likely to be fooled by a brief move and takes longer to show a real change. Traders pick the period to match the length of trend they want to follow.
As lições são gratuitas sem conta. Inicie sessão e a PipCircle lembra-se de onde parou, guarda as suas pontuações e atribui as suas medalhas. Iniciar sessão grátis
Trading foreign exchange and CFDs carries a high risk of losing money. PipCircle Learn is education and is not investment advice.