Back to MACD
MACD

12-Period EMA

The 12-period exponential moving average of the closing price. It's the fast line that feeds into the MACD calculation β€” the first of the two EMAs whose distance becomes the MACD line.

❓ Why It Matters

The 12EMA reacts quickly to fresh price action. Comparing it to the slower 26EMA reveals whether short-term momentum is outpacing the medium-term trend. When the 12EMA rises above the 26EMA, momentum is shifting bullish.

πŸ“ The Formula
12_PeriodEMA = EMA of Close over 12 periods Ξ± = 2 Γ· (12 + 1) = 0.1538 EMA(t) = Ξ± Γ— Close(t) + (1 βˆ’ Ξ±) Γ— EMA(tβˆ’1)
πŸ”Œ Data Sources

Computed

πŸ”¬ How We Compute It

We compute an exponential moving average of the closing prices over the last 12 periods using pandas' ewm with span=12, adjust=False. This is the same convention used by charting platforms like TradingView.

πŸ“Š How to Read It
  • 12EMA above 26EMA β†’ MACD line is positive (bullish bias).
  • 12EMA below 26EMA β†’ MACD line is negative (bearish bias).
  • The wider the gap between 12EMA and 26EMA, the stronger the momentum.
  • 12EMA crossing 26EMA is the fundamental MACD signal.
⚠️ Common Mistakes
  1. Using it standalone β€” it's the input to MACD, not a signal by itself.
  2. Confusing EMA with SMA β€” EMA gives more weight to recent prices.
πŸ”— Related Metrics

Stockenza Method Β· Updated 2026-10-14 Β· Educational use only