Candlestick chart with a blue EMA and an orange SMA line turning up after a downtrend
Technical Analysis← Back to Blog

Moving Averages Explained: SMA vs EMA and How Forex Traders Use Them

15 min read
Share
moving averageemasmamacd
What is a moving average? SMA vs EMA formulas with worked examples, the best periods, golden cross, a live gold example and how MACD is built from EMAs.

Quick answer

A moving average is the average closing price over a set number of periods, recalculated with every new candle so it "moves" with the chart. A simple moving average (SMA) gives every price equal weight. An exponential moving average (EMA) gives recent prices more weight, so it turns sooner when the trend changes. Traders use moving averages to read trend direction, find dynamic support and resistance and spot crossovers such as the golden cross (50-day above 200-day). The popular MACD indicator is built from two EMAs.

On 19 November 2026, gold closed at $3,734 an ounce. Its 20-day EMA was $3,966, its 50-day SMA $4,118 and its 100-day SMA $4,193. Price sat below every one of them, and each shorter average sat below the longer one. Without reading a single headline, any trader looking at that chart knew gold was in a downtrend. 📉

That's what moving averages do. They take noisy price action and turn it into a single line that shows direction, speed and the levels where buyers and sellers tend to step in. This guide explains how the SMA and EMA are calculated, how they differ, which periods traders actually use, and how to use them in forex and gold trading without the common mistakes.

1. What Is a Moving Average?

CME Group defines it simply: "A moving average is the average price of a futures contract or stock over a set period of time" (CME Group). The same idea works for any market: currency pairs, gold, indices or crypto.

A 20-period moving average on a daily chart averages the last 20 daily closes. Tomorrow, the oldest close drops out and the newest one comes in, so the line moves forward one step. On a 1-hour chart, the same 20-period average covers the last 20 hours instead.

Moving averages have two jobs:

  • Smoothing: as Fidelity puts it, "The primary purpose of moving averages is to smooth out the data you're reviewing" (Fidelity). Random day-to-day swings shrink, and the trend becomes visible.
  • Trend direction: a rising line means the average price is going up, and a falling line means it's going down.

The trade-off is lag. A moving average only uses past prices, so it always confirms a move after it has started. Longer averages are smoother but lag more. Shorter averages react faster but give more false signals.

2. The Simple Moving Average (SMA): Formula and Example

The SMA is a plain average: add up the last n closing prices and divide by n.

SMA = (C1 + C2 + … + Cn) ÷ n, where C is the closing price and n is the number of periods.

Worked example (5-period SMA on EUR/USD): the last five daily closes are 1.0850, 1.0870, 1.0820, 1.0890 and 1.0910.

  • Sum: 5.4340
  • 5-period SMA: 5.4340 ÷ 5 = 1.0868

The next day EUR/USD closes at 1.0950. The oldest close (1.0850) drops out, and the new SMA is (1.0870 + 1.0820 + 1.0890 + 1.0910 + 1.0950) ÷ 5 = 1.0888. Every close in the window counts exactly the same, whether it's from yesterday or a week ago. You can follow live EUR/USD closes on our EUR to USD page.

3. The Exponential Moving Average (EMA): Formula and Example

The EMA weights recent prices more heavily. In CME Group's words, "Exponential moving averages assign more influence on recent numbers and less on old data." It does this with a smoothing multiplier:

Multiplier = 2 ÷ (n + 1)
EMA today = (Close today × Multiplier) + (EMA yesterday × (1 − Multiplier))

Most charting platforms start the EMA with an SMA of the first n closes and then apply the formula to every new candle.

Worked example (5-period EMA): the multiplier is 2 ÷ (5 + 1) = 0.3333. Start with the SMA of 1.0868 from above. When EUR/USD closes at 1.0950:

  • EMA = (1.0950 × 0.3333) + (1.0868 × 0.6667) = 1.0895

The SMA moved from 1.0868 to 1.0888 on that strong day. The EMA moved further, to 1.0895, because the newest close carries a third of the weight. That's the whole difference between the two in one number. 🧮

Here's how much weight the newest candle gets at common EMA lengths:

EMA periodMultiplierWeight of the newest closeCommon use
90.200020.0%Short-term entries, MACD signal line
120.153815.4%Fast line inside MACD
20 / 210.0952 / 0.09099.5% / 9.1%Short-term trend, pullback entries
260.07417.4%Slow line inside MACD
500.03923.9%Medium-term trend
2000.01001.0%Long-term trend

If the 12 and 26 look familiar, they should. The MACD line is simply the 12-period EMA minus the 26-period EMA, and its signal line is a 9-period EMA of that difference. Understanding the EMA is the first step to understanding MACD.

Candlestick chart with a 20-period EMA and a 20-period SMA: after a downtrend the EMA turns up at bar 56, four bars before the SMA turns up at bar 60
Same candles, same 20-period length. At the bottom, the blue EMA turns up four bars before the orange SMA. In the steady trends either side, the two lines run almost together.

4. SMA vs EMA: The Key Differences

A common belief is that the EMA always sits closer to price. That's only half true. In a steady, straight-line trend, an SMA and an EMA of the same length lag price by about the same amount, roughly (n − 1) ÷ 2 periods, or 9.5 candles for a 20-period average. The EMA's advantage appears when the trend changes speed or direction. Because the newest candles carry more weight, the EMA bends sooner, as the chart above shows.

Simple moving average (SMA)Exponential moving average (EMA)
CalculationEqual weight for every close in the windowMore weight on recent closes, multiplier 2 ÷ (n + 1)
Reaction to a turnSlower; turns only when old prices drop outFaster; turns as soon as new prices pull it
Lag in a steady trendAbout (n − 1) ÷ 2 periodsAbout the same
False signals in choppy marketsFewerMore (whipsaws)
Typical usersLong-term traders and investors (50-day, 200-day)Short-term and swing traders (9, 12, 20, 21, 26)
Built intoBollinger Bands (20-period SMA)MACD (12 and 26 EMA)

Charles Schwab sums up the trade-off: "the EMA is typically considered more appropriate in short-term trading", while "The SMA, with its built-in lag, tends to smooth price action over time, making it a good trend indicator". Schwab also warns that the EMA "often gets whipsawed" (Charles Schwab). Neither is better in general. Choose the EMA when speed matters and the SMA when you want fewer, more reliable signals.

5. The Best Moving Average Periods (and What Each One Tells You)

PeriodUsual typeTypical chartWhat traders use it for
9 / 10EMA15-minute to 1-hourVery short-term momentum and scalping entries
20 / 21EMA or SMA1-hour to dailyShort-term trend; pullbacks to it in a strong trend
50SMA or EMA4-hour and dailyMedium-term trend and a widely watched support or resistance level
100SMADailyIntermediate trend, often used as a second line of support
200SMADailyThe long-term trend: price above it is generally treated as a bull market, below it a bear market

Popular levels matter partly because so many traders watch them. When thousands of traders have orders around the 200-day SMA of EUR/USD or gold, that line often becomes a real reaction point.

6. Five Ways Traders Use Moving Averages

1. Reading the trend direction

Price above a rising moving average signals an uptrend. Price below a falling one signals a downtrend. The slope matters as much as the position: a flat moving average with price wrapped around it means no trend, and that's when most moving average signals fail.

2. Dynamic support and resistance

In a trending market, price often pulls back to a moving average and bounces. In an uptrend, the 20 EMA or 50-day SMA can act as moving support; in a downtrend, the same lines act as resistance. Unlike horizontal levels, these move with the trend. Combine them with the levels in our guide to identifying support and resistance for stronger zones.

3. Fast and slow crossovers

When a faster average crosses above a slower one, momentum is turning up. When it crosses below, momentum is turning down. CME Group notes that "Short-term moving averages crossing above longer-term moving averages is generally seen as bullish." Common pairs are 9 and 21 EMA for short-term trading, and 20 and 50 for swing trading. This is exactly the idea that MACD turns into a single line: the MACD signal line crossover is a moving average crossover, measured as a gap.

4. The golden cross and death cross

The most famous crossover uses the 50-day and 200-day averages. A golden cross happens when the 50-day crosses above the 200-day; a death cross happens when it crosses below. Fidelity describes the golden cross as a buy signal and the death cross as a sell signal, but adds an important warning: "a golden cross or a death cross does not suggest that you should mechanically buy or sell" (Fidelity).

Price chart with the 50-day and 200-day simple moving averages, marking a golden cross when the 50-day crosses above the 200-day and a death cross when it crosses back below
The golden cross confirmed the new uptrend, and the death cross confirmed its end. Both came well after the actual turn in price, which is the price of using slow averages.

5. Stacked averages (trend strength)

When the averages line up in order, the trend is strong. In a strong uptrend, price sits above the 20, the 20 above the 50, and the 50 above the 200. In a strong downtrend the order flips. When the lines tangle and cross each other repeatedly, the market is ranging.

7. Real Example: Gold's Moving Averages on 19 November 2026

Here's how the averages looked on the daily gold chart (XAU/USD) at the close on 19 November 2026, using FloatForex daily price data:

LineValue (USD per ounce)Price vs the line
Gold price$3,734.35-
10-day SMA$3,939.635.2% below
20-day EMA$3,966.275.8% below
20-day SMA$3,974.546.0% below
50-day SMA$4,117.889.3% below
100-day SMA$4,193.1410.9% below

What this chart says, step by step:

  • The trend is down. Price is below every average, and the averages are stacked bearishly: 10 below 20, 20 below 50, 50 below 100.
  • The decline is speeding up. The 20-day EMA crossed below the 20-day SMA on 18 November. As this guide explained, that happens when the newest prices pull the EMA down faster.
  • The 50-day SMA has been resistance. Gold closed below its 50-day average on 23 September 2026 and has not closed back above it since.
  • MACD agrees. The 12-day EMA ($3,912) minus the 26-day EMA ($3,998) gives a MACD of about −85, deep below zero. See how to read MACD for what that means for momentum.

None of this predicts the next move. Trends can reverse at any time, and moving averages will only confirm a turn after it starts. What they give you is a clear, objective description of the trend right now. Follow the live chart on our gold price charts page, and read our gold price forecast for 2026 for the fundamental view. ⚖️

8. How to Use Moving Averages in Forex Trading

  1. Start on the daily chart. Check the 50-day and 200-day SMA to see the main trend on pairs such as EUR/USD, GBP/USD or USD/JPY.
  2. Trade in that direction. If price is above a rising 200-day SMA, focus on buying setups; if it's below a falling one, focus on selling setups.
  3. Drop to a 4-hour or 1-hour chart for timing. Use a 20 or 21 EMA to find pullbacks that hold the trend.
  4. Confirm with a second tool. A bullish candlestick pattern at the moving average, an RSI turning up from 40 to 50 in an uptrend, or a MACD crossover all add weight to the signal.
  5. Mind the clock. Moving average signals are more reliable when volume is high, during the London and New York sessions. See our guide to forex trading sessions or check the live forex market hours.

Before you trade, a quick look at our currency heatmap shows which currencies are strongest and weakest today. Trading a strong currency against a weak one, in the direction of the moving average, keeps you on the right side of the trend. 💱

9. Moving Averages vs MACD: What MACD Adds

MACD and moving averages aren't competitors. MACD is moving averages, packaged to show momentum.

Moving averagesMACD
What it showsTrend direction and levels on the price chartMomentum: the gap between the 12 and 26 EMA
Where it's drawnOn the price chartIn a separate panel below price
Main signalsPrice crosses, MA crossovers, bouncesSignal line crossovers, zero line crosses, histogram, divergence
StrengthClear trend and support/resistance levelsShows when a trend is speeding up or slowing down
WeaknessLags at turns; whipsaws in rangesAlso lags; false signals in ranges

Many traders use both: the 50-day and 200-day averages for direction, and MACD for timing. Our complete MACD guide covers the settings, the four main signals and how to use MACD for forex, stocks and gold.

10. Common Moving Average Mistakes

  • ❌ Using crossovers in a sideways market. When price is ranging, the averages cross back and forth and every signal fails. Check the slope first.
  • ❌ Expecting moving averages to predict. They describe the trend that already exists. They confirm turns; they don't call them.
  • ❌ Adding too many lines. Five or six averages on one chart create confusion, not confirmation. Two or three is plenty.
  • ❌ Changing settings after every loss. Constantly re-optimising the period on past data fits the past, not the future. Pick common settings and stick with them.
  • ❌ Ignoring the timeframe. A 50-period average on a 5-minute chart covers about four hours; on a daily chart it covers about ten weeks. They are completely different signals.

11. Quick Reference: Moving Average Checklist

  1. ✅ Is price above or below the 200-day SMA? That's the big-picture trend.
  2. ✅ Is the moving average sloping up, down or flat? Avoid crossover signals when it's flat.
  3. ✅ Are the 20, 50 and 200 stacked in order? That shows trend strength.
  4. ✅ Is price pulling back to the 20 EMA or 50-day SMA in a trend? That's a potential entry zone.
  5. ✅ Does a second tool agree, such as MACD, RSI or a candlestick pattern?
  6. ✅ Where will you exit if you're wrong? Many traders place stops just beyond the moving average or the last swing point.

Frequently Asked Questions: Moving Averages

What is the difference between SMA and EMA?

An SMA gives every closing price in the period equal weight. An EMA gives recent prices more weight using the multiplier 2 ÷ (n + 1). As a result, the EMA turns faster when the trend changes, while the SMA is smoother and gives fewer false signals.

Is EMA or SMA better for forex trading?

Short-term forex traders usually prefer the EMA (for example 9, 20 or 21) because it reacts faster. Longer-term traders often use the 50-day and 200-day SMA to define the main trend. Many traders combine both.

How is the EMA calculated?

First calculate the multiplier: 2 ÷ (period + 1). Then EMA today = (close today × multiplier) + (EMA yesterday × (1 − multiplier)). For a 20-period EMA, the multiplier is 0.0952, so the newest close carries 9.5% of the weight.

What does the 200-day moving average mean?

The 200-day moving average is the average closing price of roughly the last ten months of trading. Price above a rising 200-day average is generally treated as a long-term uptrend, and price below a falling one as a long-term downtrend.

What is a golden cross?

A golden cross happens when the 50-day moving average crosses above the 200-day moving average, signalling that the long-term trend may be turning up. The opposite, the 50-day crossing below the 200-day, is a death cross.

Are moving averages leading or lagging indicators?

Moving averages are lagging indicators, because they're calculated only from past prices. In a steady trend, a 20-period SMA or EMA lags price by about 9.5 periods. The EMA reacts faster when the trend changes direction or speed.

How are moving averages related to MACD?

MACD is built from moving averages. The MACD line is the 12-period EMA minus the 26-period EMA, and the signal line is a 9-period EMA of the MACD line. When the 12 EMA crosses the 26 EMA, MACD crosses zero.

Do moving averages work for gold trading?

Yes. Gold trends strongly for long periods, so the 50-day and 200-day averages are widely watched on XAU/USD. On 19 November 2026, gold traded below its 20, 50 and 100-day averages, a clear downtrend signal.

Conclusion: The Simplest Trend Tool Is Still One of the Best

Moving averages won't tell you where price is going next, but they'll always tell you where it has been heading, and that's the foundation of almost every trading decision. Use the SMA for the big picture and the EMA for timing, respect the lag, and avoid crossovers in flat markets. Once you're comfortable with them, the next step is momentum: read our guide to the MACD indicator, which turns two EMAs into one of the most useful tools on any chart. 📈

Sources

This article is for education only and is not investment advice. Charts in sections 3 and 6 use illustrative price data; the gold example uses FloatForex daily closing prices.

Disclaimer: This article is for informational purposes only and does not constitute financial advice. Exchange rates and market conditions change rapidly. Always conduct your own research before making any investment decisions.
FloatForex
← View all blog articles
Exchange rates are for informational purpose only and do not constitute financial advice
© 2026 FloatForex.com All rights reserved.