Noon Barbari
S'inscrire
Tous les articles
conceptPublié ·Lecture de 7 min

EMA vs SMA: which actually wins on crypto?

Everyone has an opinion. Few have run the numbers. Here's the head-to-head on 4h BTC/USDT across multiple regimes, with the formula, the trade-offs, and when to pick which.

Sur cette page

Pull up any crypto chat in 2026 and you'll find two camps yelling past each other. The SMA camp says "smoother, fewer fakeouts." The EMA camp says "faster, you'll catch the move." Both are right. They're optimising different things, and which one wins on your strategy depends on what your strategy is actually trying to do.

The maths, briefly

A simple moving average is exactly what the name says: average of the last N closes, all weighted equally. An exponential moving average weights recent closes more heavily, with the weight decaying exponentially as you go back. The recursive form is the one you'll see in code:

EMA recursion vs SMA window
# SMA — window-based, all weights equal
SMA[t] = (close[t] + close[t-1] + ... + close[t-N+1]) / N

# EMA — recursive, exponentially decaying weights
alpha = 2 / (N + 1)
EMA[t] = alpha * close[t] + (1 - alpha) * EMA[t-1]

# For N=20, alpha ≈ 0.0952 -> today's close is ~9.5% of the EMA,
#                  yesterday's is ~8.6%, last week's bar is ~5%.

The practical consequence: an EMA reacts faster to new information but is noisier. An SMA lags more but filters chop better. There is no universally better choice. There is only a choice that fits your strategy's purpose.

In a strong directional trend, the lag of the SMA hurts you — by the time it turns up, half the move is over. The EMA gets you in earlier and lets you ride longer. In a chopping range, the speed of the EMA hurts you — every minor reversal triggers a false crossover and bleeds you on fees and small losses. The SMA's lag becomes a feature, filtering most of the noise.

On 4h BTC/USDT historical data, an EMA(20)/EMA(50) crossover and an SMA(20)/SMA(50) crossover produce noticeably different equity curves. The EMA pair tends to win in 2020-21 (parabolic up) and lose in 2022 (chop after the top); the SMA pair smooths both. Neither dominates over a full multi-year sample. That's why the question "which one wins?" only makes sense after "on what regime, for what objective?"

How much lag, really?

A useful rule of thumb: the centre of mass of an SMA(N) sits N/2 bars behind the price. The centre of mass of an EMA(N) sits about (N-1)/2 bars behind. So an EMA(20) lags by about 9.5 bars while an SMA(20) lags by 10. The difference is small in absolute terms but the EMA's response after a sharp move is sharper because newer bars dominate the average.

What more sophisticated systems do

Most production systems don't pick one or the other. They use a regime filter — for example, only trade the EMA crossover when ADX (a trend-strength indicator) is above some threshold, and stay flat or fade when it isn't. Or they blend, taking the average of EMA and SMA to get a curve that's faster than SMA but smoother than EMA.

Regime-gated MA cross with ADX filter
strategy:
  name: ma_cross_with_regime
  indicators:
    - { id: fast,  kind: EMA, period: 20 }
    - { id: slow,  kind: EMA, period: 50 }
    - { id: trend, kind: ADX, period: 14 }
  rules:
    entry:
      type: AND
      children:
        - { type: cross_above, left: fast, right: slow }
        - { type: gt, left: trend, right: 25 }
    exit:
      type: cross_below
      left: fast
      right: slow

Which should you use?

  • If your strategy is built around catching trends early and you accept more false starts: EMA.
  • If your strategy is built around filtering noise and confirming established moves: SMA.
  • If you're uncertain: backtest both, side by side, on the exact period and symbol you intend to trade. The answer is in your data, not in someone else's tweet.

Both indicators ship in the indicators reference with identical kwargs (period, source). You can swap one for the other in any rule set by changing the kind: field, which makes A/B testing them a 30-second exercise. The full implementation is in the strategy designer.

Next steps

Stop arguing about EMA vs SMA on social media. Build both, backtest them on your real timeframe, walk-forward them on out-of-sample data, and let the equity curves settle the debate for your specific use case. The platform will run both for free.

Essaie-le sur tes propres données

Chaque concept ci-dessus est implémenté dans la plateforme. Backtest, walk-forward, paper trading, puis passage en live — même jeu de règles à chaque étape.

Lectures associées