OPEN-SOURCE SCRIPT
Cập nhật 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.
Phát hành các Ghi chú
Update: Only render on timeframe <= 15m.Phát hành các Ghi chú
Added customization for how FVGs can be extended (extended to current candle, current candle + n, or to end of trading session).Phát hành các Ghi chú
Fixed:- C.E. does not fully extend to fill the box
- Added labels for lines display
Phát hành các Ghi chú
Fixed:- Timeframes other than 1m could incorrectly plot FVGs by including bars prior to 9:30am
Phát hành các Ghi chú
Update namePhát hành các Ghi chú
- 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
Phát hành các Ghi chú
- 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.
Phát hành các Ghi chú
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
Phát hành các Ghi chú
- Fixed array boundary error on higher timeframe
- Fixed Monday FFVGs not extending through Friday EOD
Phát hành các Ghi chú
- 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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.