Anchored VWAP +/- SD Bands

633
**Anchored VWAP +/− SD Bands** plots the volume-weighted average price from a chosen anchor with ±1, ±2 and ±3 standard-deviation bands, plus a live Z-score readout so you can see *exactly* how stretched price is from session fair value.

## What it does

VWAP is the price every dollar of volume has paid since the anchor — the "fair value" reference for the session. The SD bands wrap that line in statistical confidence intervals: ~68% of bars stay within ±1σ, ~95% within ±2σ, >99% within ±3σ. Touching the bands means price is over-extended relative to where volume agrees the asset should trade.

## Features

**Three anchor modes**
- **Futures (18:00 ET)** — resets daily at the futures session open
- **Daily (00:00 ET)** — resets at midnight ET (use for crypto / 24h symbols)
- **Custom Date/Time** — resets ONCE at any timestamp you pick. Anchor from FOMC, earnings, contract roll, a swing high or low, the post-news candle — anything that matters to your context.

**Z-score panel** — live numeric readout of current σ distance from VWAP, color-coded:
- green inside ±1σ (normal)
- orange ±1σ to ±2σ (stretched)
- red beyond ±2σ (extreme)

Switchable to any of the 4 chart corners.

**±1, ±2, ±3 SD bands** — full statistical range visible at a glance, with the ±2σ channel filled blue.

**Smart warmup** — bands stay hidden for the first N bars after each anchor reset so they don't snap onto VWAP at the open.

**Configurable source** — defaults to `hlc3` (conventional VWAP input), switch to close, ohlc4, etc.

**Optional slope coloring** — color VWAP green when rising, red when falling for at-a-glance trend bias. Off by default (yellow line).

**VWAP value tag** — small label at the right tip of the line showing the current VWAP price.

**5 built-in alerts** — band tags (upper/lower), VWAP reclaim, VWAP lost, anchor reset. All carry the `{{ticker}}` placeholder.

**Works on every timeframe** — uses minute-of-day crossing detection instead of bar-start equality, so the anchor fires correctly on 1m, 4H, 8H, daily — anywhere.

## How to use

**Mean reversion**: fade ±2σ / ±3σ tags back toward VWAP. The Z-score going red flags the setup before you read the chart.

**Trend**: VWAP acts as session support/resistance. The "VWAP reclaim" and "VWAP lost" alerts mark regime shifts intraday.

**Context**: a symbol pinned to +1σ all session is trending strong; one oscillating around 0σ is balanced; one tagging both ±2σ in the same session is volatile or news-driven.

## Settings

All inputs grouped: **Anchor**, **Math**, **Display**. Panel position is swappable between all 4 corners. Every input has a tooltip.

## Notes

- The "Custom Date/Time" anchor only resets once. Use it for event-anchored trades (post-FOMC, swing high, breakout candle).
- On volume-less instruments (some indexes), the indicator falls back to a time-weighted mean so the line still renders.
- Load enough chart history to include your anchor point or the indicator will accumulate from chart-start instead.

## License

Source code is released under the Mozilla Public License 2.0. Fork freely.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน