OPEN-SOURCE SCRIPT
NY Session VWAP with Band & Signals

Overview
This Pine Script indicator is a comprehensive trading tool designed for the New York trading session, combining Volume-Weighted Average Price (VWAP) with statistical bands and multi-condition signal generation. It's optimized for traders who want to identify high-probability entry points during the NY session with strict validation filters.
Key Features
🕐 Session Management
NY Session Focus: Automatically detects and highlights the main NY trading session (9:30 AM - 4:00 PM ET)
Delayed Start Option: Configurable delay after NY open (default 15 minutes) to avoid early session noise
Visual Session Tracking: Different background colors for active NY session and pre-trading window periods
📊 VWAP & Statistical Bands
Dynamic VWAP Calculation: Resets daily at NY session open
Standard Deviation Bands: User-adjustable band width (default 1.0 standard deviations)
Real-time Updates: Continuous calculation throughout the session
🎯 Signal Generation - Multi-Layer Validation
The script generates BUY signals only when ALL conditions are met simultaneously:
Proximity to VWAP (Proximity (pts)): Price must be within X points of VWAP
Band Break: Price must close outside the upper or lower VWAP band
Direction Match: Bullish close must correspond with upper band break; Bearish close with lower band break
Close Percentage Filter:
Bullish signals: Close must be in the upper X% of the candle's range (default 75%)
Bearish signals: Close must be in the lower X% of the candle's range
Opposite Band Validation:
Bullish signals are invalidated if the candle touches the lower band
Bearish signals are invalidated if the candle touches the upper band
📈 Visual Feedback
Candle Coloring: Highlighted candles when signals trigger
Signal Markers: Clear triangle markers above candles
Debug Indicators:
Yellow markers for "filter met but no direction match"
Red markers for invalid signals (opposite band touch)
VWAP & Bands: Visual plotting with fill between bands
📋 Information Table
Real-time dashboard showing:
Session status (Active/Inactive)
Trading window state (Active/Waiting)
Current delay setting
Close percentage filter value
Current candle's close percentage
Signal status (Triggered/None)
Opposite band validation status
🔔 Alert System
Built-in alerts for:
Price crossing upper/lower bands
Price crossing VWAP
Full signal generation (all conditions met)
Ideal Use Cases
Mean Reversion Trading: Identifying overextended moves with VWAP proximity
Breakout Confirmation: Ensuring directional moves have momentum (close percentage filter)
Noise Reduction: Multiple filters prevent false signals during choppy markets
Intraday Trend Following: Capturing NY session momentum with statistical validation
Best Practices
Use on 3-minute timeframe for best signal quality on MNQ or MES
Don't trade within the first 15M, possibly even 30M, of the NY open.
Consider using the "Close Percentage Filter" at 70-80% for quality signals
The "Opposite Band" validation helps avoid false breakouts
Technical Requirements
TradingView account with Pine Script v6 support
Suitable for any instrument with NY session trading
Requires volume data for accurate VWAP calculation
This Pine Script indicator is a comprehensive trading tool designed for the New York trading session, combining Volume-Weighted Average Price (VWAP) with statistical bands and multi-condition signal generation. It's optimized for traders who want to identify high-probability entry points during the NY session with strict validation filters.
Key Features
🕐 Session Management
NY Session Focus: Automatically detects and highlights the main NY trading session (9:30 AM - 4:00 PM ET)
Delayed Start Option: Configurable delay after NY open (default 15 minutes) to avoid early session noise
Visual Session Tracking: Different background colors for active NY session and pre-trading window periods
📊 VWAP & Statistical Bands
Dynamic VWAP Calculation: Resets daily at NY session open
Standard Deviation Bands: User-adjustable band width (default 1.0 standard deviations)
Real-time Updates: Continuous calculation throughout the session
🎯 Signal Generation - Multi-Layer Validation
The script generates BUY signals only when ALL conditions are met simultaneously:
Proximity to VWAP (Proximity (pts)): Price must be within X points of VWAP
Band Break: Price must close outside the upper or lower VWAP band
Direction Match: Bullish close must correspond with upper band break; Bearish close with lower band break
Close Percentage Filter:
Bullish signals: Close must be in the upper X% of the candle's range (default 75%)
Bearish signals: Close must be in the lower X% of the candle's range
Opposite Band Validation:
Bullish signals are invalidated if the candle touches the lower band
Bearish signals are invalidated if the candle touches the upper band
📈 Visual Feedback
Candle Coloring: Highlighted candles when signals trigger
Signal Markers: Clear triangle markers above candles
Debug Indicators:
Yellow markers for "filter met but no direction match"
Red markers for invalid signals (opposite band touch)
VWAP & Bands: Visual plotting with fill between bands
📋 Information Table
Real-time dashboard showing:
Session status (Active/Inactive)
Trading window state (Active/Waiting)
Current delay setting
Close percentage filter value
Current candle's close percentage
Signal status (Triggered/None)
Opposite band validation status
🔔 Alert System
Built-in alerts for:
Price crossing upper/lower bands
Price crossing VWAP
Full signal generation (all conditions met)
Ideal Use Cases
Mean Reversion Trading: Identifying overextended moves with VWAP proximity
Breakout Confirmation: Ensuring directional moves have momentum (close percentage filter)
Noise Reduction: Multiple filters prevent false signals during choppy markets
Intraday Trend Following: Capturing NY session momentum with statistical validation
Best Practices
Use on 3-minute timeframe for best signal quality on MNQ or MES
Don't trade within the first 15M, possibly even 30M, of the NY open.
Consider using the "Close Percentage Filter" at 70-80% for quality signals
The "Opposite Band" validation helps avoid false breakouts
Technical Requirements
TradingView account with Pine Script v6 support
Suitable for any instrument with NY session trading
Requires volume data for accurate VWAP calculation
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。