What it is
A moving average smooths out the noise of single candles so you can see the direction underneath. Each new candle adds the newest price and drops the oldest, so the line moves along with the chart.
The type decides how much weight recent candles get. A simple moving average (SMA) treats every candle equally and is slow to turn. An exponential moving average (EMA) gives more weight to recent candles, so it reacts sooner. Faster types such as the Hull (HMA), DEMA, TEMA and ZLEMA cut the delay further but wobble more, while KAMA and McGinley adjust their own speed to how lively the market is.
How it is calculated
SMA: add up the last n prices and divide by n. EMA: start from the previous EMA and move it a fraction of the way towards the new price, where the fraction is 2 divided by (n + 1); for a 21 EMA that is 2/22, about 9%. WMA: weight the newest price n, the one before n minus 1, and so on, then divide by the sum of the weights. HMA: take twice a WMA of half the length, subtract a full length WMA, then smooth the result with a WMA of the square root of the length. VWMA weights each price by its candle's volume. The price used is the source you pick: close by default, or open, high, low, the high/low midpoint (hl2), the typical price (hlc3) or the average of all four (ohlc4).
Settings
| Setting | Default | Range | What it changes |
|---|---|---|---|
| type | EMA | SMA, EMA, WMA, HMA, VWMA, SMMA, DEMA, TEMA, TRIMA, ZLEMA, LSMA, KAMA, ALMA, T3, McGinley | Changes how the average weights recent candles. Faster types turn sooner but give more false turns; slower types are steadier but late. |
| length | 21 | 1 to 500 | How many candles are averaged. Short lengths (8 to 21) follow swings; long lengths (100 to 200) show the bigger trend. |
| source | close | close, open, high, low, hl2, hlc3, ohlc4 | Which price is averaged. Close is the standard; hlc3 and ohlc4 smooth out wicks a little. |
How to read it
How to trade it
- 1
Confirm the trend first: on a 15 minute gold chart, the 21 EMA should be rising and price should have closed above it for most of the last 20 candles.
- 2
Wait for a pullback to the line. A candle that dips into the 21 EMA and closes back above it is the entry trigger; buy on the close or on a break of that candle's high.
- 3
Place the stop below the pullback low, or about one ATR (average true range) below the EMA if the low is too close. If gold's 15 minute ATR is 4 points, that is a stop roughly 4 to 6 points away.
- 4
Target the last swing high first, or 2 times the stop. Trail the rest under the EMA and exit on a close below it.
- 5
For US30 the same plan works on a 5 or 15 minute chart; use the index's own ATR in points for the stop, not a fixed number.
A candle closing clearly below the moving average and the next candle failing to get back above it cancels the long idea. If the line itself then turns down, the trend view is finished.
On WickSpeak, the moving average writes a plain-English reading on the live candle: what it is, what it is doing now (for example, price above a rising 21 EMA and how far away it is), how to trade it, and what would prove that wrong. You can add it more than once, so a 21 EMA, a 50 SMA and a 200 SMA can sit on the same chart, each with its own colour, type and source.
Best markets and timeframes
Moving averages work best in markets that trend, which makes them a natural fit for gold, US30 and NAS100 on 5 minute to 4 hour charts. In tight ranges, such as quiet Asian hours on major forex pairs, they give repeated false crosses.
Common mistakes
- Treating every touch of the line as a buy, even when the line is flat and the market is ranging.
- Switching between lengths and types after each loss instead of testing one setting over many trades.
- Putting the stop exactly on the moving average, where normal noise takes it out before the trend resumes.
Works well with
Questions traders ask
Which is better, EMA or SMA?
Neither is better in every case. The EMA reacts faster because it weights recent candles more, so it suits short term pullback trading; the SMA is steadier and is the one most traders watch at 50 and 200 periods. Pick one and test it on your market rather than switching.
What moving average is best for gold?
Many gold traders use the 21 EMA for intraday pullbacks and the 50 and 200 SMAs on the 1 hour and daily charts for the bigger trend. There is no single best length; what matters is that your stop and target fit gold's typical candle size, so check the ATR alongside it.
What does it mean when price crosses the 200 moving average?
A close above the 200 period average says the long term average has been reclaimed and buyers have taken back control on that timescale. It is a change of backdrop, not an entry on its own, and many crosses fail, so wait for a retest that holds.
Is a moving average a leading or lagging indicator?
It is lagging, because it is built from past prices. Faster types such as HMA and ZLEMA reduce the lag but never remove it, which is why a moving average confirms a trend rather than calling the turn.