INDICATORS · PRICE Z-SCORE

Price Z-Score in Crypto: Why the Value Changes Before Candle Close

A price z-score measures how many standard deviations the close is from its rolling mean. The live price enters the numerator, the mean and the deviation.

Short answer

Price z-score = (close − SMA(N)) ÷ standard deviation of closes over N. On the live bar, the price moves the numerator directly, shifts the mean by 1/N and raises the deviation when far from the mean. The deviation's rise partly offsets extreme moves, so z grows less than proportionally on big intrabar moves — but threshold crosses (e.g. ±2) still happen and reverse within bars. Use closed values.

Which part of Price Z-Score uses the live bar

ComponentUses current bar?Effect intrabar
Close − meanYesDirect
MeanYes1/N shift
Std devYesRises on outliers
zYesSelf-damping

Because a large move raises the standard deviation too, z rarely reaches extreme values as quickly as the price move suggests.

Put Price Z-Score in Crypto next to price, flow and positioning in one workspace.

Open a ChartsPod workspace

How much it moves inside one bar

Price Z-Score during one bar (illustrative)Price Z-Score during one bar (illustrative): OPEN: z −0.4; MID: Drop: −2.1; LATE: Recovery: −1.4; CLOSE: −1.6.OPENz −0.4MIDDrop: −2.1LATERecovery: −1.4CLOSE−1.6
Only Price Z-Score's closing value is kept in history. Original ChartsPod editorial graphic.
Illustrative intrabar range of Price Z-Score vs its closed valueIllustrative intrabar range of Price Z-Score vs its closed value: Intrabar low z -2 ; Closed z -2 .ILLUSTRATIVE INTRABAR RANGE OF PRICE Z-SCORE VS ITS CLOSED VALUEIntrabar low z-2Closed z-2
How far Price Z-Score travels inside a bar versus between bars. Original ChartsPod editorial graphic.

Rules

Price Z-Score signal hygienePrice Z-Score signal hygiene: Signals on closed bars; Bar-close alerts; Backtest uses the same rule; Live value labelled provisional; Settings identical across chart and alerts.PRICE Z-SCORE 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.

Mean reversion with z-scores: Z-Score Mean Reversion Backtest in Crypto: Fees, Slippage and Break-Even Costs; return-based version: Return Z-Score in Crypto: Why the Value Changes Before Candle Close.

Review Price Z-Score in Crypto with bar replay before using it live.

Open ChartsPod replay

Questions readers ask

What is a price z-score?

Distance from the rolling mean in standard deviations.

Why is it self-damping?

Big moves raise the deviation.

Closed bars?

Yes.

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.