Anchored Periodic VWAP with Deviation Bands
- Indicadores
- Versão: 1.20
Anchored Periodic VWAP with Deviation Bands
A lightweight, interactive VWAP indicator that restarts every Day, Week or Month, with a built-in on-chart control panel.
Overview
Anchored Periodic VWAP plots the Volume Weighted Average Price and resets it automatically at the start of each Daily, Weekly or Monthly period. Around the VWAP it draws two pairs of standard-deviation bands, so you can see at a glance where price is trading relative to the period’s “fair value”.
You can switch the anchor period and show or hide the indicator from a compact panel on the chart. There is no need to open the settings window.
Key Features
- Three anchor periods: Daily, Weekly (Monday start) and Monthly, switchable with one click.
- 5 lines: VWAP plus Upper/Lower Band 1 and Upper/Lower Band 2 (default ±1 and ±2 standard deviations).
- On-chart control panel: DAILY / WEEKLY / MONTHLY buttons and a HIDE / SHOW INDICATOR toggle.
- Volume-weighted standard deviation: the bands are computed from volume-weighted variance, not a simple price deviation.
- Flexible price source: Typical (HLC/3), Close, OHLC/4 or Median (HL/2).
- Volume source: Tick Volume or Real Volume. If real volume is unavailable, it falls back to tick volume automatically.
- Fully customizable: band multipliers, line colors, panel corner, position, button size, font size and panel colors.
- Remembers your choice: the selected period and visibility are kept when you change the timeframe or symbol.
Performance
The indicator is built to be light on resources:
- Only the latest bar is recalculated on each new tick, using stored running sums.
- History depth is limited by the Max Bars input (default 5000, 0 = all bars).
- While the indicator is hidden, it stops calculating completely to save CPU. The lines are rebuilt when you click SHOW.
- Anchor periods are detected with fast integer math, with no heavy date structures.
How to Use
- Attach the indicator to any chart.
- Click DAILY, WEEKLY or MONTHLY on the panel to change the anchor period.
- Click HIDE INDICATOR to hide all lines, and SHOW INDICATOR to bring them back.
- Adjust the colors, bands, price type and panel layout in the Inputs tab.
Input Parameters
| Group | Parameter | Description |
|---|---|---|
| VWAP Settings | Default Anchor Period | Daily, Weekly or Monthly at startup |
| Price Type | Typical, Close, OHLC/4 or Median | |
| Volume Type | Tick or Real volume | |
| Band 1 / Band 2 Multiplier | Standard deviation multipliers (default 1.0 / 2.0) | |
| Performance | Max Bars to Calculate | Limits history depth (0 = all) |
| Line Colors | VWAP, Upper/Lower 1 and 2 | Color of each line |
| Panel Position & Size | Corner, X/Y offset, button size, font size | Panel layout |
| Panel Colors | Background, border, buttons, text | Panel appearance |
Trading Ideas
- Mean reversion: look for price returning to VWAP after it reaches the ±2 SD bands.
- Trend bias: price holding above VWAP suggests buyers are in control, and below VWAP suggests sellers.
- Support / resistance: VWAP and its bands often act as dynamic intraday levels.
- Multi-period context: switch between Daily, Weekly and Monthly to see where short-term price sits relative to longer-term value.
Notes
- Works on all symbols and timeframes. Because VWAP is built from each period’s bars, it is most informative on timeframes below the selected anchor period (for example M1–H1 for Daily VWAP).
- Forex and CFD symbols usually provide tick volume only, so the VWAP is based on tick volume there. This is the standard approach for these markets.
- Indicator only: it does not open, modify or close trades.
