VOLATILITY, DISPERSION & CANDLES

Z-score

How unusual today's price is, in standard deviations from its own recent average.

spec id: zscorelength (default 20)

What does Z-score measure?

How unusual today's price is, in standard deviations from its own recent average. Beyond ±2 is genuinely rare territory for that stock.

How is Z-score calculated?

Take today's close minus the 20-candle average, and divide by how spread out those 20 closes were.

Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.

How do I use Z-score in a bot?

In the builder, add an indicator of type zscore (parameters: length, default 20). Its value becomes an operand you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.

Related indicators

Or browse all 158 indicators in the full library.

Build a bot that trades on Z-score — the first backtest is free.

Run a free backtest