SMA in Crypto: Why the Value Changes Before Candle Close
A simple moving average treats every bar equally. The live bar's weight is exactly 1/N, which makes the SMA's intrabar movement easy to calculate.
Short answer
SMA(N) = sum of the last N closes ÷ N, and the live bar's current price stands in for its close. Inside a bar, the SMA moves by the price change ÷ N: a $500 swing moves a 20-SMA by $25 and a 200-SMA by $2.50. The SMA also changes when a bar leaves the window, which happens at the bar open, not intrabar. Crosses between price and the SMA are the part that changes most; use closed bars for them.
Which part of SMA uses the live bar
| Component | Uses current bar? | Effect intrabar |
|---|---|---|
| N−1 completed closes | No | Fixed |
| Live price (1/N weight) | Yes | Price change ÷ N |
| Dropped bar | At bar open | Step change |
A 20-SMA moves about half as much intrabar as a 20-EMA (1/20 = 0.05 vs α ≈ 0.095), which is why SMA crosses vanish slightly less often.
Compare SMA in Crypto across Binance, Bybit, OKX and Hyperliquid markets.
Open markets in ChartsPodHow much it moves inside one bar
Rules
Related: EMA in Crypto: Why the Value Changes Before Candle Close (EMA), 200-Day Moving-Average Filter Backtest in Crypto: Fees, Slippage and Break-Even Costs (200-day MA filter).
Check SMA in Crypto against a live market before relying on it.
Try it in ChartsPodQuestions readers ask
How much does an SMA move inside a bar?
Price change ÷ N.
SMA or EMA, which moves more intrabar?
EMA of the same length.
When does the oldest bar drop?
When the new bar opens.
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.
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.