OPEN-SOURCE SCRIPT
Periodic Anchored VWAP

Periodic Anchored VWAP
Overview
The Periodic Anchored VWAP is a professional volume-weighted average price indicator that anchors VWAP calculations to fixed calendar periods. Unlike traditional anchored VWAP tools that require manual point-and-click anchoring, this indicator automatically resets VWAP calculations at predefined interval boundaries (hourly, daily, weekly, monthly), providing a clean, systematic approach to volume-weighted support and resistance analysis.
Key Features
How It Works
The Golden Rule
VWAP is displayed ONLY when: Chart Timeframe < Anchor Period
This ensures VWAP lines always represent meaningful continuous calculations. For example:
Anchor Logic
Each VWAP resets at its respective period boundary:
Input Settings
Master Control:
VWAP Display Show / Hide Global toggle for all VWAP lines
Intraday Anchors (Default: Off):
Anchor VWAP Periods (Default: On):
Visual Display
Use Cases
Intraday Trading:
Swing Trading:
Position Trading:
Multi-Timeframe Analysis:
Important Notes
Performance
Version History
Start using Periodic Anchored VWAP to elevate your volume-weighted analysis across all timeframes!
Overview
The Periodic Anchored VWAP is a professional volume-weighted average price indicator that anchors VWAP calculations to fixed calendar periods. Unlike traditional anchored VWAP tools that require manual point-and-click anchoring, this indicator automatically resets VWAP calculations at predefined interval boundaries (hourly, daily, weekly, monthly), providing a clean, systematic approach to volume-weighted support and resistance analysis.
Key Features
- 13 Anchor Periods: 1H, 4H, 6H, 12H, 1D, 3D, 1W, 2W, 1M, 2M, 3M, 6M, 12M
- Smart Timeframe Filtering: Automatically hides VWAPs when chart timeframe equals or exceeds anchor period
- Individual Period Controls: Toggle each VWAP on/off independently with custom colors
- Master Toggle: Global show/hide for all VWAP lines
- Dynamic Labels: Real-time price labels at the right edge of chart
- Compact Settings: Streamlined input panel with inline color pickers
How It Works
The Golden Rule
VWAP is displayed ONLY when: Chart Timeframe < Anchor Period
This ensures VWAP lines always represent meaningful continuous calculations. For example:
- 1H VWAP appears only on timeframes smaller than 1 hour (e.g., 15min, 5min, 1min)
- 1D VWAP appears only on timeframes smaller than daily (e.g., 4H, 1H, 15min)
- 1W VWAP appears only on timeframes smaller than weekly (e.g., daily, 4H, 1H)
Anchor Logic
Each VWAP resets at its respective period boundary:
- Intraday Anchors (1H, 4H, 6H, 12H): Reset at the start of each hour/4-hour/6-hour/12-hour period
- Daily Anchors (1D, 3D): Reset at daily market open
- Weekly Anchors (1W, 2W): Reset at weekly market open
- Monthly Anchors (1M, 2M, 3M, 6M, 12M): Reset at month boundaries
Input Settings
Master Control:
VWAP Display Show / Hide Global toggle for all VWAP lines
Intraday Anchors (Default: Off):
- 1H => Teal => Short-term intraday reference
- 4H => Pink => Medium-term intraday reference
- 6H => Magenta => Half-day session reference
- 12H => Cyan => Full session reference
Anchor VWAP Periods (Default: On):
- 1D => Yellow/Green => Daily support/resistance
- 3D => Purple => Multi-day trend reference
- 1W => Blue => Weekly pivot levels
- 2W => Light Blue => Bi-weekly trend
- 1M => Green => Monthly support/resistance
- 2M => Dark Green => 2-month horizon
- 3M => Yellow => Quarterly reference
- 6M => Orange => Semi-annual trend
- 12M => Red => Annual benchmark
Visual Display
- VWAP Lines: Colored lines plotted at 2px thickness for clear visibility:
- Right-Edge Labels: Compact labels showing period and current VWAP value
- Smart Label Colors: Black or white text automatically based on line color for optimal readability
Use Cases
Intraday Trading:
- Use 1H, 4H, 6H, 12H VWAPs on lower timeframes (e.g., 5min, 15min) to identify intraday support/resistance levels
- Multiple intraday VWAPs reveal stacked liquidity zones
Swing Trading:
- 1D, 3D, 1W, 2W VWAPs help identify trend direction and mean reversion levels
- Weekly VWAP provides context for daily price action
Position Trading:
- 1M, 3M, 6M, 12M VWAPs offer long-term benchmarks for valuation assessment
- Multiple monthly VWAPs show multi-year price distribution
Multi-Timeframe Analysis:
- Visualize up to 13 VWAP levels simultaneously
- Identify confluences where multiple VWAP periods align
- Observe how price interacts with different anchored levels
Important Notes
- Timeframe Limitations: VWAPs automatically hide when the chart timeframe is equal to or greater than the anchor period (prevents misleading point-to-point lines)
- Intraday Anchors Disabled by Default: Enable only the periods relevant to your trading style to reduce visual clutter
- Monthly Anchors: Use 30-day approximation for minute calculations; display logic ensures they only appear on daily or lower timeframes
- Label Positioning: Labels appear 1-13 bars to the right of the current bar to prevent overlap with price action
Performance
- Efficiently coded with looped label management
- No repainting — all calculations are historical
- Compatible with all markets and symbols
Version History
- v.1.0 => Initial release with 13 anchor periods, timeframe validation, and dynamic labels
Start using Periodic Anchored VWAP to elevate your volume-weighted analysis across all timeframes!
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Contact me via Telegram: t.me/backtestterminal
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Contact me via Telegram: t.me/backtestterminal
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.