INDICATORS · SMA

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

ComponentUses current bar?Effect intrabar
N−1 completed closesNoFixed
Live price (1/N weight)YesPrice change ÷ N
Dropped barAt bar openStep 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 ChartsPod

How much it moves inside one bar

SMA during one bar (illustrative)SMA during one bar (illustrative): OPEN: SMA 59,900; MID: −$500 swing: SMA 59,875; LATE: +$700: SMA 59,935; CLOSE: SMA 59,920.OPENSMA 59,900MID−$500 swing: SMA 59,875LATE+$700: SMA 59,935CLOSESMA 59,920
Only SMA's closing value is kept in history. Original ChartsPod editorial graphic.
Illustrative intrabar range of SMA vs its closed valueIllustrative intrabar range of SMA vs its closed value: 20-SMA weight on live bar 0 ; 20-EMA α 0 ; 200-SMA weight 0 .ILLUSTRATIVE INTRABAR RANGE OF SMA VS ITS CLOSED VALUE20-SMA weight on live bar020-EMA α0200-SMA weight0
How far SMA travels inside a bar versus between bars. Original ChartsPod editorial graphic.

Rules

SMA signal hygieneSMA signal hygiene: Signals on closed bars; Bar-close alerts; Backtest uses the same rule; Live value labelled provisional; Settings identical across chart and alerts.SMA SIGNAL HYGIENESignals on closed barsBar-close alertsBacktest uses the same ruleLive value labelled provisionalSettings identical across chart and alerts
Closed values are what history shows. Original ChartsPod editorial graphic.

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 ChartsPod

Questions 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.

  1. TradingView Pine Script: Repainting — live vs historical calculation.
  2. 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.