PROTECTED SOURCE SCRIPT
ICT First FVG - 9:30am & Custom (v4)

ICT First FVG - 9:30am & Custom Time Ranges (v4)
📖 DESCRIPTION
This comprehensive Pine Script indicator identifies and displays Fair Value Gaps (FVGs), Volume Imbalances (VIs), and Liquidity Voids (LVs) based on Inner Circle Trading (ICT) concepts. The indicator offers dual functionality: traditional 9:30am New York session FVG detection and customizable time range analysis for maximum flexibility.
🚀 KEY FEATURES
Dual Detection System
9:30am NY Open FVG: Classic ICT first presentation detection after market open
Custom Time Range FVG: User-configurable time periods for specialized analysis
Independent Operations: Both systems work simultaneously without interference
Separate Controls: Each system has its own settings and previous days configuration
Advanced Gap Detection
Fair Value Gaps (FVG): Three-candle patterns showing price inefficiencies
Volume Imbalances (VI): Single candle volume-related gaps
Liquidity Voids (LV): Areas where price moved too fast, creating liquidity gaps
Consequent Encroachment (CE): Midpoint lines of detected inefficiencies
Precision Sizing System
Multi-Asset Support: Automatic point/pip calculation for Forex, Futures, and Indices
Forex Handling: Specialized pip calculation for major pairs and JPY crosses
Size Filtering: Minimum gap size filter to eliminate noise
Real-Time Display: Shows exact gap sizes in labels (e.g., "15.3 pips" or "12.7 pts")
Professional Visualization
Dual Display Modes: Choose between solid blocks or line representations
Color Coding: Different colors for current vs. previous day imbalances
Smart Labels: Configurable date, time, type, and size information
Extension Options: Extend gaps to session end or current bar
M1 Data Integration
High Accuracy: Uses 1-minute data regardless of chart timeframe
Better Detection: More precise gap identification on higher timeframes
Flexible Usage: Works on any timeframe ≤15 minutes
⚙️ CONFIGURATION GUIDE
General Settings
Visualization Type: Choose "Blocks" for filled areas or "Lines" for boundaries
Previous Days: Number of historical days to display (0 = today only)
Extend Imbalances: Project gaps to session end or current bar
Use M1 Data: Recommended ON for better accuracy
FVG Size Filter
Minimum FVG Size: Filter out gaps smaller than specified points
Enable Filter: Toggle size filtering on/off
🎯 RECOMMENDED MINIMUM SIZES:
USD/JPY: 0.01 points (1 pip)
Gold (XAUUSD): 1.6 points
NQ (Nasdaq-100): 0.2 points
Nasdaq CFD: 2.0 points
Other instruments: Experiment and discover optimal values
Custom FVG System
Enable Custom FVG: Activate secondary time range detection
Custom Time Range: Use session format (e.g., "1430-1600" for 2:30-4:00 PM)
Custom Previous Days: Independent historical period for custom ranges
Custom Label Color: Distinct color for custom time range gaps
Delete Default FVG 9:30: Use when running multiple instances with different timeframes
Imbalance Types
Fair Value Gaps: Main three-candle inefficiency patterns
Include Open/Close Gap: Additional gap calculation method
Volume Imbalances: Single-candle volume-based gaps
Liquidity Voids: Fast price movement gaps
C.E. (Consequent Encroachment): Midpoint reference lines
Label Customization
Show Labels: Toggle date/time information display
Include Time: Add timestamp to labels
Include Type: Display gap type (FVG, VI, LV)
Include Size: Show calculated gap size in points/pips
Position: Configure label placement (left/center/right, top/center/bottom)
Size & Color: Customize label appearance
Visual Styling
Colors: Separate colors for FVG, VI, LV types
Previous Day Colors: Distinct styling for historical gaps
Border Styles: Solid, dashed, or dotted borders
Line Widths: Configurable border thickness
📊 TECHNICAL SPECIFICATIONS
Supported Markets
Forex: All major and minor pairs with proper pip calculation
Futures: ES, NQ, YM, RTY, GC, SI, CL, etc.
Indices: SPX, NDX, DJI, and CFD versions
Stocks: Individual equities (adjust size filter accordingly)
Time Frame Compatibility
Recommended: 1m, 3m, 5m, 15m charts
Maximum: 15-minute timeframe
Optimal: 1m or 5m for best precision
Session Handling
Timezone: America/New_York (Eastern Time)
Default 9:30am: Standard NY market open detection
Custom Sessions: Any time range using HHMM-HHMM format
Weekend Filtering: Automatic exclusion of non-trading days
🔧 USAGE INSTRUCTIONS
Basic Setup
Add indicator to chart (≤15m timeframe recommended)
Enable "Use M1 Data" for accuracy
Set "Minimum FVG Size" based on instrument (see recommendations above)
Configure "Previous Days Imbalances" (5 is good default)
Custom Time Range Setup
Enable "Enable Custom FVG"
Set "Custom Time Range" (e.g., "1430-1600" for 2:30-4:00 PM ET)
Adjust "Custom Previous Days" as needed
Choose distinct "Custom Label Color" for easy identification
Multiple Instance Usage
Add indicator multiple times for different time ranges
Enable "Delete Default FVG 9:30" on additional instances
Use different custom time ranges for each instance
Assign unique colors to distinguish between instances
Label Optimization
Enable size display to see gap magnitude
Position labels to avoid chart clutter
Use appropriate label size for your screen resolution
Consider disabling time display on crowded charts
🎯 PRACTICAL APPLICATIONS
ICT Trading Concepts
First Presentation: Initial FVG after 9:30am NY open
Return to Gap: Price revisiting inefficiency areas
Mitigation Levels: Using FVG boundaries as support/resistance
Liquidity Hunting: Understanding where price seeks efficiency
Multi-Session Analysis
London Close: Set custom range for 1600-1601 London close gaps
Asian Session: Configure overnight inefficiencies
Power Hour: Analyze 1500-1600 ET gaps
Lunch Hour: Study 1200-1300 ET price behavior
Risk Management
Size-Based Filtering: Focus on significant gaps only
Historical Context: Compare current gaps to previous days
Confluence Trading: Combine with other ICT concepts
Session-Specific: Target gaps from specific market sessions
⚠️ IMPORTANT NOTES
Performance Considerations
Maximum Objects: Indicator creates multiple visual elements
Historical Limit: Adjust "Previous Days" to balance history vs. performance
Chart Refresh: Allow time for initial loading on historical data
Data Quality
Broker Dependency: Gap detection accuracy depends on data feed quality
Weekend Gaps: Sunday gaps may appear due to data provider differences
Fast Markets: Extremely volatile periods may create false gaps
Best Practices
Timeframe Consistency: Use same timeframe for analysis and execution
Size Calibration: Adjust minimum sizes based on instrument volatility
Session Awareness: Understand which sessions produce most relevant gaps
Confirmation: Use additional ICT concepts to confirm gap validity
📖 DESCRIPTION
This comprehensive Pine Script indicator identifies and displays Fair Value Gaps (FVGs), Volume Imbalances (VIs), and Liquidity Voids (LVs) based on Inner Circle Trading (ICT) concepts. The indicator offers dual functionality: traditional 9:30am New York session FVG detection and customizable time range analysis for maximum flexibility.
🚀 KEY FEATURES
Dual Detection System
9:30am NY Open FVG: Classic ICT first presentation detection after market open
Custom Time Range FVG: User-configurable time periods for specialized analysis
Independent Operations: Both systems work simultaneously without interference
Separate Controls: Each system has its own settings and previous days configuration
Advanced Gap Detection
Fair Value Gaps (FVG): Three-candle patterns showing price inefficiencies
Volume Imbalances (VI): Single candle volume-related gaps
Liquidity Voids (LV): Areas where price moved too fast, creating liquidity gaps
Consequent Encroachment (CE): Midpoint lines of detected inefficiencies
Precision Sizing System
Multi-Asset Support: Automatic point/pip calculation for Forex, Futures, and Indices
Forex Handling: Specialized pip calculation for major pairs and JPY crosses
Size Filtering: Minimum gap size filter to eliminate noise
Real-Time Display: Shows exact gap sizes in labels (e.g., "15.3 pips" or "12.7 pts")
Professional Visualization
Dual Display Modes: Choose between solid blocks or line representations
Color Coding: Different colors for current vs. previous day imbalances
Smart Labels: Configurable date, time, type, and size information
Extension Options: Extend gaps to session end or current bar
M1 Data Integration
High Accuracy: Uses 1-minute data regardless of chart timeframe
Better Detection: More precise gap identification on higher timeframes
Flexible Usage: Works on any timeframe ≤15 minutes
⚙️ CONFIGURATION GUIDE
General Settings
Visualization Type: Choose "Blocks" for filled areas or "Lines" for boundaries
Previous Days: Number of historical days to display (0 = today only)
Extend Imbalances: Project gaps to session end or current bar
Use M1 Data: Recommended ON for better accuracy
FVG Size Filter
Minimum FVG Size: Filter out gaps smaller than specified points
Enable Filter: Toggle size filtering on/off
🎯 RECOMMENDED MINIMUM SIZES:
USD/JPY: 0.01 points (1 pip)
Gold (XAUUSD): 1.6 points
NQ (Nasdaq-100): 0.2 points
Nasdaq CFD: 2.0 points
Other instruments: Experiment and discover optimal values
Custom FVG System
Enable Custom FVG: Activate secondary time range detection
Custom Time Range: Use session format (e.g., "1430-1600" for 2:30-4:00 PM)
Custom Previous Days: Independent historical period for custom ranges
Custom Label Color: Distinct color for custom time range gaps
Delete Default FVG 9:30: Use when running multiple instances with different timeframes
Imbalance Types
Fair Value Gaps: Main three-candle inefficiency patterns
Include Open/Close Gap: Additional gap calculation method
Volume Imbalances: Single-candle volume-based gaps
Liquidity Voids: Fast price movement gaps
C.E. (Consequent Encroachment): Midpoint reference lines
Label Customization
Show Labels: Toggle date/time information display
Include Time: Add timestamp to labels
Include Type: Display gap type (FVG, VI, LV)
Include Size: Show calculated gap size in points/pips
Position: Configure label placement (left/center/right, top/center/bottom)
Size & Color: Customize label appearance
Visual Styling
Colors: Separate colors for FVG, VI, LV types
Previous Day Colors: Distinct styling for historical gaps
Border Styles: Solid, dashed, or dotted borders
Line Widths: Configurable border thickness
📊 TECHNICAL SPECIFICATIONS
Supported Markets
Forex: All major and minor pairs with proper pip calculation
Futures: ES, NQ, YM, RTY, GC, SI, CL, etc.
Indices: SPX, NDX, DJI, and CFD versions
Stocks: Individual equities (adjust size filter accordingly)
Time Frame Compatibility
Recommended: 1m, 3m, 5m, 15m charts
Maximum: 15-minute timeframe
Optimal: 1m or 5m for best precision
Session Handling
Timezone: America/New_York (Eastern Time)
Default 9:30am: Standard NY market open detection
Custom Sessions: Any time range using HHMM-HHMM format
Weekend Filtering: Automatic exclusion of non-trading days
🔧 USAGE INSTRUCTIONS
Basic Setup
Add indicator to chart (≤15m timeframe recommended)
Enable "Use M1 Data" for accuracy
Set "Minimum FVG Size" based on instrument (see recommendations above)
Configure "Previous Days Imbalances" (5 is good default)
Custom Time Range Setup
Enable "Enable Custom FVG"
Set "Custom Time Range" (e.g., "1430-1600" for 2:30-4:00 PM ET)
Adjust "Custom Previous Days" as needed
Choose distinct "Custom Label Color" for easy identification
Multiple Instance Usage
Add indicator multiple times for different time ranges
Enable "Delete Default FVG 9:30" on additional instances
Use different custom time ranges for each instance
Assign unique colors to distinguish between instances
Label Optimization
Enable size display to see gap magnitude
Position labels to avoid chart clutter
Use appropriate label size for your screen resolution
Consider disabling time display on crowded charts
🎯 PRACTICAL APPLICATIONS
ICT Trading Concepts
First Presentation: Initial FVG after 9:30am NY open
Return to Gap: Price revisiting inefficiency areas
Mitigation Levels: Using FVG boundaries as support/resistance
Liquidity Hunting: Understanding where price seeks efficiency
Multi-Session Analysis
London Close: Set custom range for 1600-1601 London close gaps
Asian Session: Configure overnight inefficiencies
Power Hour: Analyze 1500-1600 ET gaps
Lunch Hour: Study 1200-1300 ET price behavior
Risk Management
Size-Based Filtering: Focus on significant gaps only
Historical Context: Compare current gaps to previous days
Confluence Trading: Combine with other ICT concepts
Session-Specific: Target gaps from specific market sessions
⚠️ IMPORTANT NOTES
Performance Considerations
Maximum Objects: Indicator creates multiple visual elements
Historical Limit: Adjust "Previous Days" to balance history vs. performance
Chart Refresh: Allow time for initial loading on historical data
Data Quality
Broker Dependency: Gap detection accuracy depends on data feed quality
Weekend Gaps: Sunday gaps may appear due to data provider differences
Fast Markets: Extremely volatile periods may create false gaps
Best Practices
Timeframe Consistency: Use same timeframe for analysis and execution
Size Calibration: Adjust minimum sizes based on instrument volatility
Session Awareness: Understand which sessions produce most relevant gaps
Confirmation: Use additional ICT concepts to confirm gap validity
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.