OPEN-SOURCE SCRIPT
已更新 VWAP Daily Bands Standard

VWAP Daily Bands is a volume-weighted average price indicator anchored to the daily session, enhanced with adaptive standard deviation bands designed to work accurately across all asset classes — including Forex, Crypto, Commodities, Indices, and Stocks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE PROBLEM THIS INDICATOR SOLVES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Most VWAP band implementations calculate standard deviation using only intraday price variance. This creates a well-known flaw: at the start of each session, when very few bars have been processed, the bands collapse to near zero and are practically useless. As the session progresses, the bands gradually widen — but asymmetrically, because early price swings distort the variance calculation.
This indicator solves that with a fixed daily ATR seed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW THE ATR SEED WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Before the session opens, the indicator fetches the previous day's closing price and ATR from the daily timeframe. These two fixed values are used to calculate a minimum band width that holds constant throughout the entire trading day — it does not fluctuate with intraday price movement.
The standard deviation used for the bands is then taken as the larger of two values: the real-time intraday price variance, or the fixed ATR-based seed variance. This means the bands are always at least as wide as the prior day's volatility warrants, while still expanding naturally when intraday price action is more volatile than usual.
The result is symmetric, stable bands from the very first bar of the session.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PROXY VOLUME ENGINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Many brokers and CFD platforms do not provide real volume data. Without volume, a VWAP calculation loses its core meaning.
This indicator includes a built-in Proxy Volume Engine that automatically detects the current symbol and maps it to a liquid equivalent source with real volume data. For example, XAUUSD is mapped to COMEX:GC1!, EURUSD to FX:EURUSD, BTCUSD to BINANCE:BTCUSDT, and so on — covering over 80 symbols across all major asset classes. If the platform provides native volume, it is used directly. If not, the proxy volume is applied transparently with no action required from the user.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IS PLOTTED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• VWAP (white) — daily anchor VWAP calculated from HLC3, reset at the start of each session, weighted by effective volume.
• Upper bands (cyan) — 1σ, 2σ, and 3σ above the VWAP, indicating potential resistance or overbought zones.
• Lower bands (red) — 1σ, 2σ, and 3σ below the VWAP, indicating potential support or oversold zones.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Show Daily VWAP — toggle the VWAP line on or off.
• Show Band 1σ / 2σ / 3σ — toggle each band pair individually.
• Band Width Multiplier — scales all bands up or down proportionally (default 1.0).
• Daily ATR Period — controls how many days are used to calculate the ATR seed (default 5).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COMPATIBLE WITH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Forex majors, minors and exotics · Crypto (via Binance) · Gold, Silver, Platinum, Palladium · Oil and Natural Gas · Agricultural commodities · US Dollar Index · Major global indices: DOW, NASDAQ, S&P 500, Nikkei, DAX, FTSE, CAC, MIB, ASX, Hang Seng · Top US and European stocks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The VWAP calculation uses Pine Script's native HLC3-based volume-weighted average price as its mathematical foundation. The ATR seed mechanism, Proxy Volume Engine, and adaptive band logic are original contributions developed specifically for this indicator to address real limitations found in standard VWAP band implementations.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE PROBLEM THIS INDICATOR SOLVES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Most VWAP band implementations calculate standard deviation using only intraday price variance. This creates a well-known flaw: at the start of each session, when very few bars have been processed, the bands collapse to near zero and are practically useless. As the session progresses, the bands gradually widen — but asymmetrically, because early price swings distort the variance calculation.
This indicator solves that with a fixed daily ATR seed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW THE ATR SEED WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Before the session opens, the indicator fetches the previous day's closing price and ATR from the daily timeframe. These two fixed values are used to calculate a minimum band width that holds constant throughout the entire trading day — it does not fluctuate with intraday price movement.
The standard deviation used for the bands is then taken as the larger of two values: the real-time intraday price variance, or the fixed ATR-based seed variance. This means the bands are always at least as wide as the prior day's volatility warrants, while still expanding naturally when intraday price action is more volatile than usual.
The result is symmetric, stable bands from the very first bar of the session.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PROXY VOLUME ENGINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Many brokers and CFD platforms do not provide real volume data. Without volume, a VWAP calculation loses its core meaning.
This indicator includes a built-in Proxy Volume Engine that automatically detects the current symbol and maps it to a liquid equivalent source with real volume data. For example, XAUUSD is mapped to COMEX:GC1!, EURUSD to FX:EURUSD, BTCUSD to BINANCE:BTCUSDT, and so on — covering over 80 symbols across all major asset classes. If the platform provides native volume, it is used directly. If not, the proxy volume is applied transparently with no action required from the user.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IS PLOTTED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• VWAP (white) — daily anchor VWAP calculated from HLC3, reset at the start of each session, weighted by effective volume.
• Upper bands (cyan) — 1σ, 2σ, and 3σ above the VWAP, indicating potential resistance or overbought zones.
• Lower bands (red) — 1σ, 2σ, and 3σ below the VWAP, indicating potential support or oversold zones.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Show Daily VWAP — toggle the VWAP line on or off.
• Show Band 1σ / 2σ / 3σ — toggle each band pair individually.
• Band Width Multiplier — scales all bands up or down proportionally (default 1.0).
• Daily ATR Period — controls how many days are used to calculate the ATR seed (default 5).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COMPATIBLE WITH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Forex majors, minors and exotics · Crypto (via Binance) · Gold, Silver, Platinum, Palladium · Oil and Natural Gas · Agricultural commodities · US Dollar Index · Major global indices: DOW, NASDAQ, S&P 500, Nikkei, DAX, FTSE, CAC, MIB, ASX, Hang Seng · Top US and European stocks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The VWAP calculation uses Pine Script's native HLC3-based volume-weighted average price as its mathematical foundation. The ATR seed mechanism, Proxy Volume Engine, and adaptive band logic are original contributions developed specifically for this indicator to address real limitations found in standard VWAP band implementations.
版本注释
UPDATE⚠️ IMPORTANT:
- This indicator uses volume from EXTERNAL SOURCES, not broker volume
- Volumes may NOT match what you see on the chart
- Use as a secondary tool, as a SUPPLEMENT, not as the sole basis for decisions
- It is the user’s responsibility to validate the data
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Fabricio Nicolau
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Fabricio Nicolau
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。