OPEN-SOURCE SCRIPT
Aggiornato 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.
Note di rilascio
📌 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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.