OPEN-SOURCE SCRIPT
VWAP (ARCHI)

VWAP Bands — Volume Weighted Average Price with Deviation Bands
Overview
**VWAP Bands** is an advanced VWAP indicator featuring automatic standard deviation bands (±1σ, ±2σ, ±3σ), multiple anchor period options, and fully customizable visuals. Designed for intraday and swing traders who use volume-weighted levels for decision-making.
🔑 Key Features
📐 **Anchored VWAP** — Choose your reset period: Session (default), Week, Month, Quarter, or Year. VWAP resets at the beginning of each period.
📊 **Deviation Bands** — Three levels of standard deviation bands (±1σ, ±2σ, ±3σ) highlight statistical zones of overextension relative to the volume-weighted mean price.
🎨 **Full Customization** — Adjustable colors, line widths, band fills, and edge labels. Toggle each band on/off independently.
📍 **Previous VWAP Close** — Optionally display the closing VWAP level from the previous session as a key reference point.
📈 How to Use
Identifying Value Zones
- Price **at VWAP** = fair value. Institutional traders benchmark execution quality against VWAP.
- Price **above VWAP** = buyers in control, bullish bias.
- Price **below VWAP** = sellers in control, bearish bias.
Mean Reversion Trading
- Price touches **±2σ** = extreme deviation, look for a reversal back to VWAP.
- Price touches **±3σ** = very rare event, high probability of a pullback.
- **±1σ** = normal volatility range, not a standalone signal.
Trend vs Range
- **Trending market**: Price stays on one side of VWAP, bands widen.
- **Ranging market**: Price oscillates around VWAP, bands contract.
### Confluence Trading
Combine VWAP Bands with horizontal support/resistance levels. When a VWAP band aligns with a key level — that's a high-probability zone for entries.
⚙️ Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| Anchor Period | Session | VWAP reset period (Session/Week/Month/Quarter/Year) |
| Source | hlc3 | Price source (hlc3, close, ohlc4) |
| Band 1 Multiplier | 1.0 | First band (±1σ) |
| Band 2 Multiplier | 2.0 | Second band (±2σ) |
| Band 3 Multiplier | 3.0 | Third band (±3σ) |
| Fill Bands | ✅ | Color fill between bands |
| Show Labels | ✅ | Labels at band edges |
| Prev VWAP Close | ❌ | Previous session VWAP close level |
💡 Tips
1. **Intraday (M5–H1):** Use Anchor = Session. VWAP resets daily.
2. **Swing (H4–D1):** Use Anchor = Week or Month for broader context.
3. **Forex/Gold:** Source `hlc3` provides the closest approximation to tick-based VWAP.
4. **Stocks:** Session VWAP matches the standard institutional benchmark.
⚠️ Note
This indicator calculates VWAP from bar data (OHLCV), not tick data. On lower timeframes (M1–M5), accuracy is near-perfect. On higher timeframes (H4+), slight deviations from tick-based VWAP may occur — this is a fundamental limitation of bar-based calculation.
Overview
**VWAP Bands** is an advanced VWAP indicator featuring automatic standard deviation bands (±1σ, ±2σ, ±3σ), multiple anchor period options, and fully customizable visuals. Designed for intraday and swing traders who use volume-weighted levels for decision-making.
🔑 Key Features
📐 **Anchored VWAP** — Choose your reset period: Session (default), Week, Month, Quarter, or Year. VWAP resets at the beginning of each period.
📊 **Deviation Bands** — Three levels of standard deviation bands (±1σ, ±2σ, ±3σ) highlight statistical zones of overextension relative to the volume-weighted mean price.
🎨 **Full Customization** — Adjustable colors, line widths, band fills, and edge labels. Toggle each band on/off independently.
📍 **Previous VWAP Close** — Optionally display the closing VWAP level from the previous session as a key reference point.
📈 How to Use
Identifying Value Zones
- Price **at VWAP** = fair value. Institutional traders benchmark execution quality against VWAP.
- Price **above VWAP** = buyers in control, bullish bias.
- Price **below VWAP** = sellers in control, bearish bias.
Mean Reversion Trading
- Price touches **±2σ** = extreme deviation, look for a reversal back to VWAP.
- Price touches **±3σ** = very rare event, high probability of a pullback.
- **±1σ** = normal volatility range, not a standalone signal.
Trend vs Range
- **Trending market**: Price stays on one side of VWAP, bands widen.
- **Ranging market**: Price oscillates around VWAP, bands contract.
### Confluence Trading
Combine VWAP Bands with horizontal support/resistance levels. When a VWAP band aligns with a key level — that's a high-probability zone for entries.
⚙️ Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| Anchor Period | Session | VWAP reset period (Session/Week/Month/Quarter/Year) |
| Source | hlc3 | Price source (hlc3, close, ohlc4) |
| Band 1 Multiplier | 1.0 | First band (±1σ) |
| Band 2 Multiplier | 2.0 | Second band (±2σ) |
| Band 3 Multiplier | 3.0 | Third band (±3σ) |
| Fill Bands | ✅ | Color fill between bands |
| Show Labels | ✅ | Labels at band edges |
| Prev VWAP Close | ❌ | Previous session VWAP close level |
💡 Tips
1. **Intraday (M5–H1):** Use Anchor = Session. VWAP resets daily.
2. **Swing (H4–D1):** Use Anchor = Week or Month for broader context.
3. **Forex/Gold:** Source `hlc3` provides the closest approximation to tick-based VWAP.
4. **Stocks:** Session VWAP matches the standard institutional benchmark.
⚠️ Note
This indicator calculates VWAP from bar data (OHLCV), not tick data. On lower timeframes (M1–M5), accuracy is near-perfect. On higher timeframes (H4+), slight deviations from tick-based VWAP may occur — this is a fundamental limitation of bar-based calculation.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.