CommonQuant logoCommonQuant.aiA Replikate Business
Loading…
trend indicator

Simple Moving Average (SMA)

SMA calculates the average price over a fixed number of periods, giving equal weight to each period. It smooths price action to reveal the underlying trend.

Formula

SMA = (P1 + P2 + ... + Pn) / N
where P = price, N = number of periods

Method: Fidelity: Simple Moving Average

Common strategies

  • Golden cross: SMA(50) crossing above SMA(200) — a bullish long-term signal.
  • Death cross: SMA(50) crossing below SMA(200) — a bearish long-term signal.
  • Support/resistance: SMA(200) acts as dynamic support in bull markets and resistance in bear markets.

How CommonQuant uses it

CommonQuant pre-calculates SMA(20), SMA(50), and SMA(200) on all timeframes. DSL strategies can reference sma(period).

Frequently asked questions

What is a golden cross?

A golden cross occurs when the 50-period SMA crosses above the 200-period SMA. It is a lagging trend signal and can reverse without a lasting uptrend.

SMA vs EMA — what's the difference?

SMA gives equal weight to all periods, while EMA weights recent prices more heavily. EMA reacts faster and can change direction more often; SMA is smoother. Both describe past prices and can give false signals.

Compare this indicator

Explore

All indicator guides · Trade ideas