OPEN-SOURCE SCRIPT
已更新 ICT 9:30am First FVG

This indicator is designed based on ICT (Inner Circle Trader)'s algorithmic price action theory, specifically targeting the first fair value gap (FVG) that forms immediately after the New York Stock Exchange opens at 9:30am. The FVG represents an imbalance in the price delivery where a significant price action gap occurs, which can play a crucial role in future price movements.
Features:
Purpose:
The first fair value gap formed after the market opens is an important algorithmic price range in ICT's price action theory. This indicator simplifies the identification of these critical gaps and helps in understanding their impact on future price action.
Features:
- Identification of First FVG: Automatically identifies and plots the first fair value gap that forms post the 9:30am NY open.
- Customizable Visualization: Choose between block or line styles for visual representation, with customizable colors and border styles.
- Date Labeling: Optionally displays date labels for each identified gap to track patterns over time.
- Imbalance Extension: Options to extend the imbalances to the current bar, helping to visualize their influence on ongoing price action.
Purpose:
The first fair value gap formed after the market opens is an important algorithmic price range in ICT's price action theory. This indicator simplifies the identification of these critical gaps and helps in understanding their impact on future price action.
版本注释
Update: Only render on timeframe <= 15m.版本注释
Added customization for how FVGs can be extended (extended to current candle, current candle + n, or to end of trading session).版本注释
Fixed:- C.E. does not fully extend to fill the box
- Added labels for lines display
版本注释
Fixed:- Timeframes other than 1m could incorrectly plot FVGs by including bars prior to 9:30am
版本注释
Update name版本注释
- Added options to show Volume Imbalances and Liquidity Voids
- Include imbalance type (FVG, VI, LV) in the label
- Organized settings with additional style options
- Fixed some calculations incorrectly showing old imbalances
版本注释
- Fixed: Incorrect float calculation could cause imbalances to extend left infinitely .
- Improvement: Gaps are now plotted based on `time` instead of `bar_index`, offering future support for different chart vs indicator timeframes (in progress).
- Improvement: Added option to include gaps (VI/LV) between candle close/open as part of the FVG calculation.
版本注释
Major UpdatesMulti-Session Support
- Upgraded from single 9:30am NY session to 6 configurable sessions
- Pre-configured: Midnight (00:00), NY AM (09:30), NY PM (13:30)
- Three additional user-defined custom sessions
- Sessions can cross midnight (e.g., 23:30-01:00)
- Each session independently tracks its first imbalance
Intelligent FVG Replacement System
- New "Prioritize Displacement" feature allows stronger FVGs to replace earlier ones
- Exponential time decay (λ) penalizes older gaps, favoring earlier session imbalances
- Grace period protects the first FVG for a configurable duration after session start
- Superiority factor requires new FVGs to exceed existing ones by a specified multiple
- ATR normalization enables fair comparison across different volatility regimes
- Option to keep replaced FVGs visible with distinct coloring
Enhanced Extension Options
- Enum-based extension modes: None, Session End, Day End, Week End
- Monday FFVG special handling: Option to extend Monday's first FVG through the entire trading week
- Previous imbalance extension: Control whether historical imbalances continue extending
Session Boundary Visualization
- Visual session boundaries with configurable start/end lines
- Session titles positioned above price action with ATR-based scaling
- Session fill colors for each configured session
Improved Label System
- Custom label patterns with placeholders:
Pine Script® {date}, {time12}, {time24}, {type} - Default formatting remains available with toggle-based customization
Technical Improvements
- Upgraded to Pine Script v6
- Type-based state management for better performance and reliability
- Improved cleanup logic based on unique trading days (accounts for weekends/holidays)
- Better code organization with comprehensive tooltips
Bug Fixes
- Fixed extension bug where only the last imbalance extended
- Improved session detection logic for all imbalance types (FVG, VI, LV)
- More accurate date-based tracking and cleanup
版本注释
- Fixed array boundary error on higher timeframe
- Fixed Monday FFVGs not extending through Friday EOD
版本注释
- Re-added support for forward offset extension
- Introduced alerts for when new imbalances are created as well as when they are retraced back into for the first time.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。