WHY these numbers (12, 26, 9)? They are the classic defaults Gerald Appel chose in the 1970s (roughly 2 weeks, 1 month, and ~2 weeks of trading days). They are conventions, not laws — you can tune them, but everyone watching the same defaults creates self-fulfilling behavior.
A Simple Moving Average (SMA) treats a price 26 days ago the same as yesterday. But recent prices matter more for momentum. The EMA fixes this by weighting recent prices heavier.
Why α=2/(n+1)? The average age of data in an SMA of length n is (n−1)/2. The average age of the geometric EMA weights is (1−α)/α. Setting them equal:
α1−α=2n−1⇒α=n+12.
WHY the difference? The 12-EMA reacts faster than the 26-EMA. When price rallies, the fast one pulls up first, so their gap grows → positive & rising MACD = accelerating uptrend. When they cross, MACD crosses zero.
The raw MACD is jumpy. Smooth it once more:
Signalt=EMA9(MACD)t,Histt=MACDt−Signalt.
WHY a histogram?Hist is the derivative-like quantity: it flips sign exactly when MACD crosses Signal, and its height shows how fast momentum is separating. Shrinking bars = momentum weakening before the actual crossover — an early warning.
Imagine two friends walking: a fast friend and a slow friend. When they're running downhill (price rising), the fast friend gets way ahead — the gap between them grows. MACD is just that gap. When the fast friend starts getting tired and the gap stops growing, you know they're about to slow down — that's your early clue the "walk" (trend) is ending. The histogram is just how quickly that gap is changing.
Dekho, MACD ka core idea bahut simple hai: hum do moving averages lete hain — ek fast (12-period EMA) aur ek slow (26-period EMA). Jab price upar jaati hai to fast wala pehle react karta hai, isliye dono ke beech ka gap badhta hai. Yeh gap hi MACD line hai. Gap badh raha hai matlab momentum strong hai; gap ghat raha hai matlab momentum thanda pad raha hai. Toh MACD asal me price ko nahi, momentum ke change ko track karta hai.
EMA kyun, SMA kyun nahi? Kyunki SMA me 26 din purani price aur kal ki price ko barabar weight milta hai, jo galat hai — recent price zyada important hai. EMA recent prices ko zyada weight deta hai, aur uska smoothing constant α=2/(n+1) hota hai (yeh formula humne derive kiya taaki EMA ki "average age" SMA jaisi rahe). Signal line MACD ka hi EMA-9 hai (aur smooth), aur histogram = MACD − Signal — yeh bars jab shrink hone lagti hain to crossover se pehle hi warning de deti hain.
Trading me teen signal use hote hain: signal-line crossover (jaldi entry, par sideways market me whipsaw), zero-line crossover (slow par strong confirmation, kyunki tab EMA12 ne EMA26 ko cross kiya), aur divergence (price naya high banaye par MACD nahi — yeh reversal ka hint). Yaad rakhna: sideways market me MACD bahut fake signals deta hai, isliye ek trend filter (jaise 200-day SMA) laga do. Aur do alag stocks ka raw MACD kabhi compare mat karna — kyunki woh price units me hota hai, ₹3000 wale stock ka MACD ₹30 wale se automatically bada dikhega.