Z score
How far the close sits from its recent average, in standard deviations; beyond +/-2 is stretched.
The indicator takes the close and measures how far it sits from the average of the last window closes, in standard deviations of those same closes. The current bar is one of the closes it compares against, so each reading reflects its own recent history. A flat window, with every close equal, returns zero instead of dividing by zero. The first window minus one bars show no value.
How to read it
- The line sits in its own pane below the price and is centred on zero, the recent average close.
- Above +2 the close is well above its recent average, below -2 well below. At default settings about one bar in ten is beyond +/-2.1.
- At default settings the line stays within about +/-4.35. A reading that turns back from beyond +2 or -2 shows the stretch easing.
What it outputs
- Z-score
- How many standard deviations the close sits from its average over the window. Zero is the average.
Settings
- window
- How many closes the average and spread use. Raising it slows the baseline and raises the ceiling, about +/-sqrt(window minus 1). Lowering it reacts within minutes. At 1 the line is always zero; at 2 it is only +/-1 or 0.
Pitfalls
- The window sets a hard ceiling of about +/-sqrt(window minus 1): 4.36 at the default 20, so a reading of 5 cannot occur with defaults.
- It measures distance from a recent average, not momentum. In a steady trend the close can sit at one extreme for a long time, so a stretched reading alone is not a turn signal.
- Windows of 1 or 2 carry almost no information (constant zero, or only +/-1 and 0), and the first window minus one bars are blank.