VWAP Distance Z-score [PeByte]

by pedrobyte · published April 13, 2026

17TrendVolume
Open in MMT

About

"How extended or compressed is price relative to VWAP?" The answer is plotted as a histogram bar — positive above zero when price is above VWAP, negative when below. Distance Measurement Modes Raw Distance Output is either % (percentage from VWAP) or absolute price difference Thresholds are set manually via ATR-based, StdDev, Percentile, or Fixed Value rules Z-Score (recommended default) Output is statistically normalized: 0 = at VWAP, ±1 = 1 standard deviation away, etc. Self-adapting — no manual threshold tuning needed Two sub-modes: Per Bar (Real-time): rolling window over the last N bars of distance values Per Period Close (Structural): uses only end-of-period snapshots, filters intrabar noise, auto-falls back to Per Bar for long periods (Y/Q) until enough history accumulates Supported VWAP Sources Fixed Periods (reset at period boundary): 4H, Daily, Weekly, Monthly, Quarterly, Yearly Rolling Windows (continuous sliding): 7D, 14D, 30D, 60D, 90D, 120D, 180D, 365D Multiple sources can be active simultaneously — each gets its own histogram bar per bar. Sigma Reference Lines & Fills When in Z-Score mode, horizontal reference lines are drawn at ±1σ, ±2σ, ±3σ with optional zone fills between them. Three visual styles: single color, traffic-light (green/orange/red), or gradient. Zones can also be adjusted by a volatility multiplier that widens/narrows thresholds based on recent volatility relative to its average. Divergence Detection — Hybrid System Detects price/Z-Score divergences (price makes new high/low but Z-Score doesn't confirm): Mode Delay Type Real-Time 0 bars Unconfirmed, drawn immediately Classic Pivot 2–5 bars Confirmed via pivot structure Hybrid Both Preliminary signal upgrades to confirmed Period Reset Protection: suppresses false divergence signals that would naturally appear at VWAP resets (configurable buffer of N bars after each reset). Percentile Ranking Tracks where the current Z-Score sits within its recent history (configurable lookback window), displayed on the Y-axis as a percentile label. Statistics Table Floating label showing: current Z-Score, percentile rank, mean (μ), standard deviation (σ), sample count (n), volatility regime, and an auto-fallback warning when Per-Period mode switches to Per-Bar due to insufficient history. Visual Customization 5-level color gradient for positive (green family) and negative (red family) histogram bars, intensity scaling with distance magnitude Configurable bar labels and Y-axis value display Period reset lines — vertical markers where fixed-period VWAPs reset Divergence markers (circles on histogram) and text labels (⚡BEAR, ✓BULL, etc.) Stats table position: right of last bar, top/bottom left/right corners

Use VWAP Distance Z-score [PeByte] on your own charts.

MMT runs in your browser with a free forever tier. No credit card needed.