OPEN-SOURCE SCRIPT
업데이트됨 Multi-Anchor VWAP Grid [AGPro Series]

Multi-Anchor VWAP Grid [AGPro Series]
🔹 Overview
Multi-Anchor VWAP Grid is a volume-weighted analysis tool that plots five independently anchored VWAP lines on the same chart — anchored from swing high, swing low, higher-timeframe pivot, all-time high, and session open. Each anchored VWAP includes optional ±1σ and ±2σ standard deviation bands, forming a dynamic grid of volume-weighted support and resistance levels. When three or more VWAPs converge within a tight ATR-based band, the indicator draws a rectangular confluence zone highlighting the area as a higher-probability price reaction region.
The script is fully automatic. All five anchors are detected by internal engines (pivot detection, session detection, timeframe change detection, all-time-high tracker) and require no manual date picking or retroactive anchor placement. Install the indicator, select which anchors you want active, and the grid builds itself.
🔹 What It Does Differently
Most anchored VWAP tools plot one anchor at a time and require the user to manually place the anchor each time a new swing or event is identified. This script plots five anchors simultaneously and lets them compete for relevance. When multiple independent anchors agree on a price level, that agreement itself becomes the signal — visualized as a confluence zone. A single VWAP is one data point. Five VWAPs intersecting within 0.5 ATR of each other is a structural event.
The confluence detection engine tests each active VWAP as a reference point, counts how many others fall within the user-defined ATR tolerance, and picks the densest cluster on each bar. A minimum VWAP count threshold (default 3) prevents noise, and a lifecycle manager extends, adaptively resizes, and expires zones based on bar age and midpoint drift.
🔹 Methodology
**Anchor engines**
Swing High and Swing Low VWAPs reset on each confirmed pivot using the standard ta.pivothigh / ta.pivotlow detector with a configurable lookback length. HTF Pivot VWAP resets at the start of each selected higher-timeframe period (daily, weekly, or monthly) using timeframe.change. ATH VWAP resets whenever a new all-time high is printed on the visible chart. Session Open VWAP resets at the first bar of each trading session defined by the session window input.
**VWAP calculation**
Each anchor maintains three running accumulators since its last reset: sum of (price × volume), sum of volume, and sum of (price² × volume). VWAP is computed as the first divided by the second. Standard deviation is derived from the variance identity: sqrt(E[X²] − E[X]²), where E[X²] and E[X] are computed from the running accumulators. Bands are plotted at configurable multipliers of this running standard deviation.
**Confluence engine**
On each bar, the script evaluates every active VWAP as a potential cluster center. For each candidate center, it counts how many other active VWAPs fall within ATR × tolerance distance. The cluster with the highest count wins. If the winning count meets or exceeds the minimum threshold, the bar is marked as confluence-active.
**Zone lifecycle**
When confluence becomes active, a new rectangular zone is created spanning the min/max of the clustered VWAPs. As long as confluence remains active and the cluster midpoint drifts less than 0.5 ATR from its original midpoint, the zone extends to the current bar and adaptively resizes with rate-limited expansion (maximum 1 ATR growth per bar per direction, preventing erratic stretching). If the midpoint drifts more than 0.5 ATR, a new zone is created. A 5-bar debounce prevents micro-breaks in confluence from prematurely closing active zones. Zones auto-expire after a configurable age limit (default 120 bars).
🔹 Signals and Panel Readouts
The information panel in the top-right corner (position and theme configurable) displays:
- **Price Bias** — count of VWAPs price is currently above vs below, with an overall BULL / BEAR / MIXED classification
- **Confluence** — current status (active with cluster count, or none) and the minimum-count threshold in use
- **Closest VWAP** — which of the five VWAPs is currently closest to price, and the distance in ATR units
- **Active VWAPs** — each enabled VWAP's current value and percent distance from close
Two alert conditions are built in: new confluence zone detection, and price crossing any active VWAP line.
🔹 Key Inputs
**Anchor Points group** — toggle each of the five VWAPs on or off, set swing pivot lookback length, choose HTF timeframe (D/W/M), define the session window for intraday anchoring.
**Deviation Bands group** — toggle bands on or off, configure band 1 and band 2 multipliers, enable or disable gradient fills between VWAP and the first band.
**Confluence Zones group** — toggle zones on or off, set minimum VWAPs required for a confluence (2 to 5), adjust the ATR-based tolerance, define maximum zone age in bars.
**Panel group** — toggle panel, choose location (six positions), select Dark or Light theme, set font size (Small / Normal / Large).
**Labels group** — toggle the compact end-of-line labels that identify each VWAP at the right edge of the chart.
🔹 How to Use
This indicator is designed as a context layer, not a standalone entry signal. Suggested workflow:
**1. Identify structural bias.** Check the Price Bias row in the panel. If 4 or 5 VWAPs sit below price (BULL), the market is trading above its most relevant volume-weighted averages across multiple timeframes and event contexts. The opposite applies for BEAR.
**2. Watch for confluence formation.** When the panel shows Confluence ACTIVE with 3 or more VWAPs clustered, a meaningful volume-weighted support or resistance area is forming. These zones often precede reaction or reversal behavior.
**3. Use bands for context.** When price trades near the ±1σ band of a single VWAP, reversion back toward that VWAP is statistically more likely. ±2σ extensions indicate volatility outliers.
**4. Cross-reference with your own tools.** This script is most useful combined with price action, volume profile, or a trend filter of your choice. It does not generate entries or exits on its own.
🔹 Tips
- On crypto 24h markets, set Session Window to 0000-2359 for a full-day session VWAP.
- Higher Swing Pivot Length values (30–50) filter noise on higher timeframes; lower values (10–15) are better for intraday.
- If the chart feels visually crowded, disable the ±2σ bands or reduce the number of active anchors. All five are rarely needed simultaneously.
- For the strongest confluence signals, increase Min VWAPs for Confluence to 4 — rarer but higher conviction.
🔹 Limitations and Transparency
- The script uses standard Pine Script pivot detection for swing anchors. Pivots are confirmed only after the pivot length has passed, which means swing VWAP anchors are placed retrospectively by that many bars. This is an inherent limitation of all pivot-based tools, not a bug.
- ATH tracking is limited to the visible chart range. On timeframes or symbols where the chart does not load full history, the "ATH" anchor represents the highest point within loaded data, not the true all-time high.
- Standard deviation bands assume price dispersion around each VWAP is approximately normal over the anchored period. In strongly trending markets, this assumption weakens and bands may widen significantly.
- Confluence zones are descriptive, not predictive. They mark areas where multiple volume-weighted averages happen to agree. They do not guarantee price reaction, only indicate where reaction is more plausible than average.
- Session Window input must match the instrument's trading hours to produce a meaningful intraday VWAP. Incorrect session definitions will produce misleading anchor points.
🔹 Risk Disclosure
This indicator is provided for educational and analytical purposes only. It is not financial advice, investment advice, or a recommendation to buy, sell, or hold any asset. All trading involves substantial risk of loss. Past chart behavior and historical VWAP reactions do not guarantee future results. Users are solely responsible for their own trading decisions and risk management. Always combine indicator output with independent analysis and appropriate position sizing. The author accepts no responsibility for any financial outcome resulting from the use of this script.
🔹 Overview
Multi-Anchor VWAP Grid is a volume-weighted analysis tool that plots five independently anchored VWAP lines on the same chart — anchored from swing high, swing low, higher-timeframe pivot, all-time high, and session open. Each anchored VWAP includes optional ±1σ and ±2σ standard deviation bands, forming a dynamic grid of volume-weighted support and resistance levels. When three or more VWAPs converge within a tight ATR-based band, the indicator draws a rectangular confluence zone highlighting the area as a higher-probability price reaction region.
The script is fully automatic. All five anchors are detected by internal engines (pivot detection, session detection, timeframe change detection, all-time-high tracker) and require no manual date picking or retroactive anchor placement. Install the indicator, select which anchors you want active, and the grid builds itself.
🔹 What It Does Differently
Most anchored VWAP tools plot one anchor at a time and require the user to manually place the anchor each time a new swing or event is identified. This script plots five anchors simultaneously and lets them compete for relevance. When multiple independent anchors agree on a price level, that agreement itself becomes the signal — visualized as a confluence zone. A single VWAP is one data point. Five VWAPs intersecting within 0.5 ATR of each other is a structural event.
The confluence detection engine tests each active VWAP as a reference point, counts how many others fall within the user-defined ATR tolerance, and picks the densest cluster on each bar. A minimum VWAP count threshold (default 3) prevents noise, and a lifecycle manager extends, adaptively resizes, and expires zones based on bar age and midpoint drift.
🔹 Methodology
**Anchor engines**
Swing High and Swing Low VWAPs reset on each confirmed pivot using the standard ta.pivothigh / ta.pivotlow detector with a configurable lookback length. HTF Pivot VWAP resets at the start of each selected higher-timeframe period (daily, weekly, or monthly) using timeframe.change. ATH VWAP resets whenever a new all-time high is printed on the visible chart. Session Open VWAP resets at the first bar of each trading session defined by the session window input.
**VWAP calculation**
Each anchor maintains three running accumulators since its last reset: sum of (price × volume), sum of volume, and sum of (price² × volume). VWAP is computed as the first divided by the second. Standard deviation is derived from the variance identity: sqrt(E[X²] − E[X]²), where E[X²] and E[X] are computed from the running accumulators. Bands are plotted at configurable multipliers of this running standard deviation.
**Confluence engine**
On each bar, the script evaluates every active VWAP as a potential cluster center. For each candidate center, it counts how many other active VWAPs fall within ATR × tolerance distance. The cluster with the highest count wins. If the winning count meets or exceeds the minimum threshold, the bar is marked as confluence-active.
**Zone lifecycle**
When confluence becomes active, a new rectangular zone is created spanning the min/max of the clustered VWAPs. As long as confluence remains active and the cluster midpoint drifts less than 0.5 ATR from its original midpoint, the zone extends to the current bar and adaptively resizes with rate-limited expansion (maximum 1 ATR growth per bar per direction, preventing erratic stretching). If the midpoint drifts more than 0.5 ATR, a new zone is created. A 5-bar debounce prevents micro-breaks in confluence from prematurely closing active zones. Zones auto-expire after a configurable age limit (default 120 bars).
🔹 Signals and Panel Readouts
The information panel in the top-right corner (position and theme configurable) displays:
- **Price Bias** — count of VWAPs price is currently above vs below, with an overall BULL / BEAR / MIXED classification
- **Confluence** — current status (active with cluster count, or none) and the minimum-count threshold in use
- **Closest VWAP** — which of the five VWAPs is currently closest to price, and the distance in ATR units
- **Active VWAPs** — each enabled VWAP's current value and percent distance from close
Two alert conditions are built in: new confluence zone detection, and price crossing any active VWAP line.
🔹 Key Inputs
**Anchor Points group** — toggle each of the five VWAPs on or off, set swing pivot lookback length, choose HTF timeframe (D/W/M), define the session window for intraday anchoring.
**Deviation Bands group** — toggle bands on or off, configure band 1 and band 2 multipliers, enable or disable gradient fills between VWAP and the first band.
**Confluence Zones group** — toggle zones on or off, set minimum VWAPs required for a confluence (2 to 5), adjust the ATR-based tolerance, define maximum zone age in bars.
**Panel group** — toggle panel, choose location (six positions), select Dark or Light theme, set font size (Small / Normal / Large).
**Labels group** — toggle the compact end-of-line labels that identify each VWAP at the right edge of the chart.
🔹 How to Use
This indicator is designed as a context layer, not a standalone entry signal. Suggested workflow:
**1. Identify structural bias.** Check the Price Bias row in the panel. If 4 or 5 VWAPs sit below price (BULL), the market is trading above its most relevant volume-weighted averages across multiple timeframes and event contexts. The opposite applies for BEAR.
**2. Watch for confluence formation.** When the panel shows Confluence ACTIVE with 3 or more VWAPs clustered, a meaningful volume-weighted support or resistance area is forming. These zones often precede reaction or reversal behavior.
**3. Use bands for context.** When price trades near the ±1σ band of a single VWAP, reversion back toward that VWAP is statistically more likely. ±2σ extensions indicate volatility outliers.
**4. Cross-reference with your own tools.** This script is most useful combined with price action, volume profile, or a trend filter of your choice. It does not generate entries or exits on its own.
🔹 Tips
- On crypto 24h markets, set Session Window to 0000-2359 for a full-day session VWAP.
- Higher Swing Pivot Length values (30–50) filter noise on higher timeframes; lower values (10–15) are better for intraday.
- If the chart feels visually crowded, disable the ±2σ bands or reduce the number of active anchors. All five are rarely needed simultaneously.
- For the strongest confluence signals, increase Min VWAPs for Confluence to 4 — rarer but higher conviction.
🔹 Limitations and Transparency
- The script uses standard Pine Script pivot detection for swing anchors. Pivots are confirmed only after the pivot length has passed, which means swing VWAP anchors are placed retrospectively by that many bars. This is an inherent limitation of all pivot-based tools, not a bug.
- ATH tracking is limited to the visible chart range. On timeframes or symbols where the chart does not load full history, the "ATH" anchor represents the highest point within loaded data, not the true all-time high.
- Standard deviation bands assume price dispersion around each VWAP is approximately normal over the anchored period. In strongly trending markets, this assumption weakens and bands may widen significantly.
- Confluence zones are descriptive, not predictive. They mark areas where multiple volume-weighted averages happen to agree. They do not guarantee price reaction, only indicate where reaction is more plausible than average.
- Session Window input must match the instrument's trading hours to produce a meaningful intraday VWAP. Incorrect session definitions will produce misleading anchor points.
🔹 Risk Disclosure
This indicator is provided for educational and analytical purposes only. It is not financial advice, investment advice, or a recommendation to buy, sell, or hold any asset. All trading involves substantial risk of loss. Past chart behavior and historical VWAP reactions do not guarantee future results. Users are solely responsible for their own trading decisions and risk management. Always combine indicator output with independent analysis and appropriate position sizing. The author accepts no responsibility for any financial outcome resulting from the use of this script.
릴리즈 노트
🔧 UPDATE NOTES - V1.3This update focuses on readability, structure, visual clarity, and usability.
The core purpose of the script remains unchanged.
This release improves how the existing multi-anchor VWAP logic is presented, organized, and interpreted on the chart.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
• Rebuilt the script source structure under the current AGPro Series format.
The public script title now follows the updated naming rule, while the panel title keeps the AG Pro brand presentation.
• Reworked the visual hierarchy of the VWAP grid.
The five anchor references remain visible by default, but deviation bands are now controlled through a cleaner band display mode.
• Added a clearer confluence scoring model.
The panel now summarizes VWAP confluence with a compact count and 0-100 context score.
• Improved confluence zone presentation.
Zones now use centered internal text and controlled projection so the chart remains readable without losing the main support/resistance map.
• Rebuilt the panel lifecycle.
The panel uses the required single merged blue header row and avoids clearing the header row during normal updates.
------------------------
Visual Improvements
------------------------
• Improved chart readability by adjusting VWAP labels, confluence zones, band visibility, and label spacing.
• Reduced visual clutter by making Primary Only band mode the default presentation.
• Refined visual hierarchy so core VWAP anchors, active confluence, and grid bias stand out more clearly.
• Adjusted label positioning to reduce overlap with candles and nearby VWAP lines.
------------------------
Interface & Usability
------------------------
• Optimized panel layout for clearer information flow.
• Added configurable label density, label font size, panel font size, panel position, and panel theme controls.
• Kept the summary panel enabled by default for immediate context.
• Enhanced overall user experience without changing the core multi-anchor VWAP logic.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical purpose of the script.
The goal is to improve clarity and usability, not to introduce predictive behavior.
Users should interpret outputs the same way as before, but with improved visual structure.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, timeframe differences, and available chart history may affect how VWAP anchors and confluence zones appear.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
릴리즈 노트
🔧 UPDATE NOTES - v1.4This update adds an imperative action readout and a confluence-hold proof.
The core purpose of the script remains unchanged.
It continues to map five anchored VWAP references and highlight confluence clusters where
multiple fair-value references compress into the same price area.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
- Action row
The panel now states a clear next-action context such as Watch Confluence, Track Up Bias,
Track Down Bias or Wait Balance, derived from the existing grid state and confluence proximity.
- Confluence Hold Rate proof
The panel now reports how often a fresh confluence zone historically held as support or
resistance, reacting in the respecting direction before slicing through, shown with the
sample count for transparency.
- Hold proof window input
A new setting controls the window used to measure post-formation reaction.
- Honest, conservative counting
Each zone is counted once, and a break through the far side or a window expiry without a
clean reaction is treated as not-held, so the rate stays realistic on the selected market.
- Symbol-robust zone sizing
Confluence zone padding is now fully ATR-proportional, which keeps zones correctly sized on
percentage and index symbols instead of being inflated by a tick-based floor.
------------------------
Visual Improvements
------------------------
- Replaced the confluence zone's plain text with a centered solid-color badge, so the zone
label stays readable on any chart background, including light themes
- Fixed end-label text contrast so every anchor tag stays readable on its color
- Centered the zone badge both vertically and horizontally inside the confluence zone
- Kept the five-anchor VWAP grid, deviation bands and confluence zones unchanged
- Maintained balanced event-label density and a clean first-glance read
------------------------
Interface & Usability
------------------------
- Added an Action row for a direct next-action cue
- Added a Hold Rate row for an at-a-glance support/resistance track record
- Added a window setting so the proof measures prompt reactions
- Enhanced overall user experience without changing the core VWAP logic
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The VWAP anchors, grid bias, confluence detection and scores are unchanged. The Hold Rate is
a separate historical track-record layer and does not alter how zones are computed.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, session settings and timeframe differences
may affect how anchors, zones and the rate appear.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.