Exponential Moving Average (EMA)
EMA is a moving average that gives more weight to recent prices, making it more responsive to new information than a simple moving average.
Formula
EMA_today = (Price_today × K) + (EMA_yesterday × (1 - K)) where K = 2 / (N + 1), N = period length
Method: Fidelity: Exponential Moving Average
Common strategies
- EMA crossover: Fast EMA (9 or 21) crossing above slow EMA (50 or 200) is bullish; below is bearish.
- Dynamic support/resistance: Price bouncing off the 200 EMA in an uptrend.
- EMA ribbon: Multiple EMAs (8,13,21,34,55,89) stacked to visualize trend strength.
How CommonQuant uses it
CommonQuant pre-calculates EMA(9), EMA(21), EMA(50), and EMA(200) on all timeframes. DSL strategies can reference ema(period) for any of these.
Frequently asked questions
EMA vs SMA — which is better?
EMA gives more weight to recent prices, so it responds faster but can change direction more often. SMA weights periods equally and is smoother. The useful choice depends on the timeframe and the decision you are testing.
What is the 200 EMA?
The 200-period EMA is a long-term trend reference. Price above or below it describes the current relationship to that average, but does not by itself establish a bull or bear market or predict the next move.