MACD in Crypto: Warm-Up Bars and Short-History Errors
MACD needs a 26-bar EMA plus a 9-bar signal before its first full reading — and its EMAs keep depending on the starting point after that.
Short answer
MACD(12, 26, 9) needs at least 26 bars for the slow EMA and 9 more for the signal line, so the first histogram value appears around bar 34. Because EMAs are recursive, values continue to depend on the series start for many more bars; on a coin listed a few weeks ago, or a short data pull, MACD crosses can differ from those computed on long history. Drop early bars and compare with a longer series before trusting crosses.
How much history MACD needs
| Component | Bars needed | Type |
|---|---|---|
| EMA(12) | 12+ | Recursive |
| EMA(26) | 26+ | Recursive |
| Signal EMA(9) of MACD | +9 (≈ 34 total) | Recursive |
| Histogram | ≈ 34 | Derived |
Recursive smoothing: values depend on where the series starts and settle only gradually.
Short-history errors
- Crosses on new listings
- Screens mixing old and new coins
- Short API pulls
- Gaps restarting the EMA
Rules
Related: MACD in Crypto: Why the Value Changes Before Candle Close, Crypto Indicator Series: Null vs Zero - Handle Missing Fields Correctly.
Load long history before reading MACD in ChartsPod.
Open ChartsPodDrop early bars and compare with a longer series before trusting crosses.
Compare MACD in Crypto across Binance, Bybit, OKX and Hyperliquid markets.
Open markets in ChartsPodQuestions readers ask
How many bars does MACD need?
About 34 for the first histogram value with default settings.
Why does history beyond that matter?
EMAs are recursive.
What about new coins?
Treat early MACD as unreliable.
Sources and methodology
Indicator formulas are standard definitions; live-versus-closed behaviour follows TradingView's repainting documentation. Values in examples are illustrative.
- TradingView Pine Script: Repainting — live vs historical calculation.
- ChartsPod indicator reference — indicator calculations.
- ChartsPod indicator reference — indicator calculations.
This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.
CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.