EMA weights recent observations more heavily; SMA weights each observation in its window equally. Neither formula alone establishes superior trading results.

Does a rising average mean the latest price rose?

Four hypothetical closes are 90, 100, 110 and 105. Compare average updates from the third to fourth candle.

Scroll sideways to see the full diagram

Does a rising average mean the latest price rose?Closes: 90, 100, 110, 105. The first three-price SMA is 100; the next window of 100, 110, 105 gives 105. Latest price falls 5 while SMA rises 5. EMA(3), seeded at the first SMA of 100, uses α=0.5 and updates to 102.5. Only the two available readings of each average are shown.Latest price falls; both averages rise90100110C1C2C3C4110105Price: 110 → 105, change −5SMA(3): 100 → 105, change +5EMA(3): 100 → 102.5, change +2.5SMA drops 90 and adds 105.
Assumptions: one timeframe and Close series, three-price SMA; EMA starts on candle three from SMA=100 with α=2/(3+1)=0.5. SMA update: (105−90)/3=5; EMA: 100+0.5×(105−100)=102.5. Lines exclude earlier EMA history. TradingView: SMA window and EMA calculation.
An average's direction describes its own change, not the latest price change.

Two formulas, two personalities

SMA(N) is the sum of N selected prices divided by N. Each carries weight 1/N: SMA20 assigns 5% to each of twenty bars on one stated interval. A new observation replaces the oldest, so the update is (new price − dropped price)/N. Its sign need not match the change from the immediately preceding close.

Standard EMA uses α = 2/(N + 1) and EMA(t) = α × C(t) + (1 − α) × EMA(t−1). The update is α × [C(t) − EMA(t−1)]. For N greater than 1, α exceeds 1/N, so the newest price has more direct influence than in SMA(N). On an ideal infinite history, the weight at age j is α(1 − α)j; for N = 20, ages 0, 1, 10 and 20 carry about 9.5238%, 8.6168%, 3.5007% and 1.2868%. A finite calculation also contains its chosen initial state; it does not include data preceding that start by magic.

SMA5 and EMA5 on the same five EUR/USD closes
Closes (oldest first)1.0800 · 1.0820 · 1.0840 · 1.0850 · 1.0900
SMA5(1.0800 + 1.0820 + 1.0840 + 1.0850 + 1.0900) / 5 = 1.0842
EMA5 (exact multiplier 2/6, first-close seed)1.0852345679... for the stated five closes
Differenceapproximately 10.35 pips
TakeawayEMA weights recent prices more; it is not always closer to the latest price.

With the stated first-close seed and the exact EMA5 multiplier 2/6, the five closes give an EMA of about 1.0852345679 and an SMA of 1.0842, a difference of about 10.35 pips. EMA gives greater weight to recent prices, but it is not always closer to the latest price and need not signal every directional change earlier than SMA.

Compare updates and distances on the same price path

Greater weight on the latest observation does not imply that EMA always lies closer to the price. Keep the input series, interval, period and initial state fixed before comparing the lines. Their readings, recognized signals and net trade results are separate measurements.

Reaction speed. Greater recent-price weight is a formula property; an earlier turn on every occasion is not. A signal test must specify how a turn is identified and account for when the value became available.

Take six hypothetical closes in arbitrary units: 100, 100, 100, 106, 94, 100. With N = 3, α = 0.5, seed EMA on bar 3 from the first SMA of 100; the first two readings are undefined in this convention.

SMA3 and EMA3 with the same SMA initial value
BarCloseSMA3EMA3Absolute distance: SMA / EMA
31001001000 / 0
41061021034 / 3
59410098.56 / 4.5
610010099.250 / 0.75

On bar 6, SMA equals the latest close while EMA does not. This disproves “EMA is always closer,” without establishing SMA as a more profitable strategy. Adding a next close of 102 gives SMA3 = (94 + 100 + 102)/3 ≈ 98.6667 and EMA3 = 0.5 × 102 + 0.5 × 99.25 = 100.625. The relative distances can change again.

Crossovers and costs. Count crossings under a fixed definition on the same data. Their frequency and trading result depend on the path, holding rule and costs; neither EMA nor SMA has a universally better false-signal rate.

Long-term trend description. A long SMA or EMA summarizes historical prices under different weights. A popular SMA200 is one reference, but popularity does not prove superior performance or guarantee a price reaction.

A period counts bars; it does not prescribe a trading style

Periods such as 20, 50 and 200 are conventions. At roughly 20–22 daily sessions per month, 20 bars approximate one month, 50 a little over two months and 200 roughly nine to ten months. Translate bars into the actual market calendar rather than assume that 50 or 100 bars equal a quarter.

Specify the interval and initialization
SMA200 on M5200 × 5 = 1000 minutes: 16 hours 40 minutes of bars; breaks can extend calendar time.
SMA200 on D1200 daily bars: a different horizon, not a guaranteed barrier.
EMA20 on H1Hourly input and α = 2/21; memory does not end at the twentieth bar.
Price sourceClose, typical price and candle median are different inputs.
Drawing offsetMoving the line on the chart does not reveal a future EMA.
Matched comparisonUse the same feed, calendar, missing-data policy and available history.

EMA needs an initial value. Fidelity describes starting from SMA; pinned TA-Lib v0.6.4 uses an SMA seed in its default compatibility mode, while an alternative first-price start is a different calculation, as in the five-close example above. With the same later inputs, an initial difference is multiplied by (1 − α)k after k updates. It does not disappear immediately after N bars. Compare implementations and version settings before interpreting a discrepancy as a new market signal.

Golden Cross and Death Cross — what they really mean

A Golden Cross conventionally describes a shorter average crossing above a longer one, often SMA50 above SMA200. A downward cross is called a Death Cross. State the exact average types and periods: the names describe observed crossings and do not guarantee a new trend.

Separate crossing detection from a trading rule
CalculationState both average types, lengths, input price and interval.
ObservationFor a close-based rule, evaluate a cross after the bar closes.
AvailabilityThe final daily average is not known that same morning on H4.
EntryDefine an order separately; historical Close is not a guaranteed fill.
ExitSpecify invalidation, size and execution assumptions before the test.
EvaluationMeasure all accepted trades after costs, not just favorable crosses.

A crossing describes an observed relationship between calculated lines. Popular Golden Cross examples use SMA50 and SMA200; replacing the short SMA with EMA changes the calculation. The crossing alone supplies neither a probability of a new bull market nor a compulsory trade direction. Define whether you use it as a condition, entry or exit, then test that exact rule.

EMA and SMA apply different weights to past prices. Their usefulness depends on the tested trading rule.

Specify a separate execution rule

A testable framework uses a long average as a directional filter, a medium average to define an observation zone and a shorter average as part of an entry rule. Its effectiveness depends on the specification, sample and costs; no author track record is asserted.

  1. Inputs and availability. Record each line’s feed, price source, interval, length and initial state; use only readings then available.
  2. Observation rule. Define the permitted side of a line or distance to it numerically. A pullback zone needs boundaries and a time limit, not merely a favorable-looking chart.
  3. Entry and cancellation. State what qualifies as the reaction, when an order becomes active and when it is canceled. A candle pattern processes related price data rather than provide automatically independent confirmation.

Choose exits, size and costs before evaluating outcomes. A planned 2:1 or 3:1 reward-to-risk ratio is an assumption about price levels, not evidence that the target is attainable or the strategy profitable. An ordinary stop may fill at a different price, and scaling out changes the payoff distribution. Preserve those execution choices when comparing EMA and SMA.

Check configuration before explaining a difference

A mismatch can come from the input window or implementation. Inspect the calculation before attributing it to market behavior or changing a trading rule.

  • Window rotation. A rising SMA compares the new price with the dropped price, not necessarily the immediately previous close.
  • Interval. SMA200 on M5 and D1 summarize different horizons. Neither is automatically meaningless or optimal.
  • Initialization. A first-close start and an SMA seed leave different finite-history EMA readings.
  • Price source and gaps. Check the feed, selected price and missing-data policy. EMA20 on H1 is not defined as a few weeks of prices.
  • Test selection. Record all parameter variants tried and assess unused data. Familiar lengths and extra filters do not establish an edge; a fixed 200-pip distance supplies no universal continuation probability.

Compare on one fixed sample

Choose type and period for a stated rule, then compare alternatives on the same data and cost assumptions. A faster response can help or hurt depending on the rule. Neither an added indicator nor a familiar period automatically improves performance.

Conclusions

A useful distinction is the shape of the weights. Define the latest price’s age as 0, the preceding one as 1. SMA(N) has weighted mean age (N − 1)/2. For ideal infinite-history EMA, geometric weights give mean age (1 − α)/α, which is also (N − 1)/2 when α = 2/(N + 1). At N = 20, both mean ages are 9.5 bars, although the current price weights are 5% and about 9.5238%. EMA puts about (19/21)20 × 100 = 13.5110% on observations older than the latest twenty; SMA puts zero there. This own calculation does not measure crossing delay, identical line shape or profitable timing. A finite EMA additionally retains its initial-state influence.

A three-layer test can assign the daily SMA200 to a directional condition, EMA50 to an observation zone and a shorter EMA to entry timing. Define the relevant price reaction before collecting results. A widely watched line does not guarantee that price will react to it.

If a close-based test combines D1 and H4, preserve when the final daily reading became known. The completed daily value cannot be used earlier that same day merely because it appears on the finished chart. Record the signal and subsequent executable price separately. A filter can reject profits as well as losses, so evaluate all accepted and rejected observations under a fixed method.

What to do tomorrow

  1. Recalculate the counterexample. Use the six stated closes, N = 3 and SMA seed; check where SMA is closer. Then add the seventh close of 102 and recompute both values without resetting the EMA.
  2. Review the directional filter. Record whether your last thirty entries were above or below the daily SMA200. Compare results with your stated rule; the opposite side alone does not prove a trade should never have occurred.
  3. Test the pullback rule. Define the zone, trigger and invalidation point before observing outcomes. Track accepted and rejected signals and results after costs. Rejection count alone does not measure filter performance.

Related reading: moving averages — the mathematical comparison is the earlier, shorter version of this topic with more emphasis on the formulas; MACD — how to read the momentum indicator is built directly on the difference between two exponential averages; multi-timeframe analysis shows how to combine averages from different time frames into a single coherent system.