Moving Averages: SMA vs EMA and What the Length Changes

Moving Averages: SMA vs EMA and What the Length Changes

EUR/JPY OANDA:EURJPY



Moving averages are on almost every chart, and the length is usually the first setting people change. This post looks at what the length does to a simple moving average (SMA) and an exponential moving average (EMA), and where the two really differ, on one past section.

1) How each is computed
SMA(N): the plain average of the last N closes. Each of them has a weight of 1/N, and older closes have none.
EMA(N): new EMA = previous EMA + alpha x (close – previous EMA), with alpha = 2 / (N + 1). The weights get smaller bar by bar and never become exactly zero.
For N = 20: the latest close has a weight of 5% in the SMA and about 9.5% in the EMA. About 13.5% of the EMA’s total weight is still on closes older than 20 bars.

2) Where the delay comes from
An average of past closes describes the past. The average age of the closes in an SMA(N) is (N – 1) / 2 bars: 9.5 bars for N = 20, 24.5 for N = 50, 99.5 for N = 200. In a steady straight-line move, the SMA sits behind price by as much as price moves in that many bars.
The EMA with the same N has the same average age, (N – 1) / 2 bars. So in a steady move, SMA 20 and EMA 20 run almost on top of each other. The first box on this chart shows such a stretch.

3) Where they differ: after a change
The EMA puts more weight on the latest closes, so after a sharp change in direction it usually bends earlier than the SMA of the same length. The second box shows one such turn.
The SMA has its own quirk: it also moves when an old close leaves the window, N bars after that close, even if the latest bars are quiet. The EMA has no such step, but it keeps a small part of old closes for a long time.

4) What the length changes
– Longer N: a smoother line, more bars of delay, fewer crossings with price. The grey SMA 50 on this chart is an example.
– Shorter N: a line closer to price, less delay, more crossings that later look like noise.
Every length is a balance between smoothness and delay; changing it moves the balance, it does not remove the delay.

5) Starting values
An EMA depends on where its calculation starts. With a long chart history the effect is negligible, but on a short history the first values can differ between platforms.

Common misreadings
– Price above or below an average describes the last N bars. It is not a forecast.
– Crossings between price and an average, or between two averages, come late by construction. This post does not discuss or test any crossing rule.
– “The EMA is faster, so it is better.” Faster also means more crossings. Neither type is better in general.
– Lengths such as 20, 50 or 200 are conventions, not special numbers.

Limitations
– The source (close, high, low, HL2 and so on) and the timeframe change the line.
– The delay figures in 2) assume a steady straight-line move. In a sideways market both averages cross price often and those figures describe the picture poorly.
– This section was chosen because the steady stretch and the turn are easy to see. One example says nothing about which length suits any purpose.

Chart: OANDA:EURJPY 1D, a past section (March 2024 to September 2024) used only as an example. Built-in Moving Average Simple (length 20, blue), Moving Average Exponential (length 20, orange) and Moving Average Simple (length 50, grey), all on the close. The two boxes and the notes were drawn by hand with TradingView drawing tools. What happened after this section is not discussed here.

For education only. This is not investment advice and not a forecast or trade recommendation for this or any symbol.

Previous Article

Gold 1H: Bullish Structure, Waiting for the Dip

Next Article

XAUUSD: Market Analysis and Strategy for December 3

You might be interested in …

ETHUSDT Descending Channel or Potential Reversal at Key Support?

ETHUSDT Descending Channel or Potential Reversal at Key Support? Ethereum / TetherUS BINANCE:ETHUSDT XAUApex 🔹 ETHUSDT continues to trade within a descending channel, reflecting a bearish short-term market structure with consistent lower highs and lower lows. Price is currently hovering near the lower boundary of the channel around $1,733, where selling pressure remains visible. The recent rejection from the $1,800–$1,820 […]

NVDA Bounced Off $125 Now $168 Decides Everything

NVDA Bounced Off $125 Now $168 Decides Everything NVDAUSDTPERP PERPETUAL MIX CONTRACT BITGET:NVDAUSDT.P RIXOOO NVDA dropped from $243 to $125 in a few weeks, then buyers showed up with the biggest volume we’ve seen in this move. Price is sitting around $156 now, holding above $150, right as GTC kicks off. Here’s how I see it. If NVDA can close […]

XAU/USD – Channel Breakdown Puts $3,535 in Focus

XAU/USD – Channel Breakdown Puts $3,535 in Focus Gold OANDA:XAUUSD AuricVerse_HQ 🟡 XAUUSD has broken below the lower boundary of its descending channel on the H4 chart. Successive lower highs and bearish BOS signals have gradually weakened the market structure, while persistent resistance from the Ichimoku cloud suggests sellers still hold the advantage. The key area I’m watching is $3,810.04–$3,920.81. […]

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *