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提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。