OPEN-SOURCE SCRIPT
已更新 Dual Vwap on Intraday

Indicator Name: Dual VWAP on Intraday
Version: Pine Script v5
Description
This indicator plots two separate VWAP (Volume Weighted Average Price) lines on intraday charts, helping traders identify intraday trend bias and potential support/resistance zones.
The script is designed exclusively for intraday timeframes and will stop execution if used on daily or higher intervals.
🔍 How It Works
VWAP Calculation
Uses a custom function that calculates VWAP fresh for each trading session.
VWAP #1: Based on hl2 (average of high and low).
VWAP #2: Based on high price.
Dynamic Color Coding
The VWAP lines change color if the percentage change from the previous bar exceeds ±0.5%, signaling notable short-term volatility.
Otherwise, they retain their default colors:
Blue: VWAP (hl2 source)
Orange: VWAP (High source)
Intraday-Only Restriction
Prevents accidental use on higher timeframes to maintain accuracy.
📈 How to Use
Trend Confirmation: Both VWAPs above price → Bearish bias; both below → Bullish bias.
Support/Resistance: VWAP lines often act as strong intraday support or resistance.
Momentum Shift: Watch for price crossing either VWAP with strong candle bodies for potential reversals or breakouts.
Volatility Alerts: Darkened VWAP line indicates an intraday percentage change greater than 0.5%, signaling increased momentum.
⚠️ Notes
Works only on intraday timeframes (1m, 5m, 15m, etc.).
Best paired with volume and price action analysis.
Version: Pine Script v5
Description
This indicator plots two separate VWAP (Volume Weighted Average Price) lines on intraday charts, helping traders identify intraday trend bias and potential support/resistance zones.
The script is designed exclusively for intraday timeframes and will stop execution if used on daily or higher intervals.
🔍 How It Works
VWAP Calculation
Uses a custom function that calculates VWAP fresh for each trading session.
VWAP #1: Based on hl2 (average of high and low).
VWAP #2: Based on high price.
Dynamic Color Coding
The VWAP lines change color if the percentage change from the previous bar exceeds ±0.5%, signaling notable short-term volatility.
Otherwise, they retain their default colors:
Blue: VWAP (hl2 source)
Orange: VWAP (High source)
Intraday-Only Restriction
Prevents accidental use on higher timeframes to maintain accuracy.
📈 How to Use
Trend Confirmation: Both VWAPs above price → Bearish bias; both below → Bullish bias.
Support/Resistance: VWAP lines often act as strong intraday support or resistance.
Momentum Shift: Watch for price crossing either VWAP with strong candle bodies for potential reversals or breakouts.
Volatility Alerts: Darkened VWAP line indicates an intraday percentage change greater than 0.5%, signaling increased momentum.
⚠️ Notes
Works only on intraday timeframes (1m, 5m, 15m, etc.).
Best paired with volume and price action analysis.
發行說明
📌 Key Points – Dual VWAP (Today Only)Intraday-Only Restriction
Works exclusively on intraday timeframes (1m, 5m, 15m, etc.).
Throws an error if loaded on daily or higher timeframe.
VWAP Types Plotted
VWAP #1 (Blue): Based on hl2 (average of high & low).
VWAP #2 (Orange): Based on high price.
Today-Only Display
Plots only for the current trading day, hides all previous day VWAP lines.
Resets calculation at first candle of today (or at market open if using market-open version).
Session Reset Logic
VWAP calculation starts fresh each day’s first bar.
Uses cumulative (price × volume) ÷ (volume) method per session.
Dynamic Color Alerts
Default colors: Blue (hl2 VWAP), Orange (High VWAP).
Turns semi-transparent black if VWAP % change from previous bar > ±0.5%, signaling notable intraday volatility.
Trading Use-Cases
Trend Bias: Price above both VWAPs → Bullish bias; below both → Bearish bias.
Support/Resistance: VWAP lines often act as strong intraday levels.
Momentum Shift: Price crossing VWAP with strong volume can hint at reversals or breakouts.
Volatility Alerts: Darkened line = significant momentum change.
Customization Possible
Market open time can be adjusted (default: 09:15 for NSE in Market-Open version).
Percentage change threshold for color change can be modified.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。