OPEN-SOURCE SCRIPT
Cập nhật Dual-Timeframe ICT Order Blocks

Dual-Timeframe ICT & Volumized Order Blocks is an overlay indicator designed to identify, display, and manage ICT-style bullish and bearish order block zones across one or two configurable timeframes.
The script focuses on market structure context, liquidity-driven order block formation, optional volume information, and clean multi-timeframe visualization. It is built for traders who want to see where recent institutional-style displacement zones may exist, while keeping primary and secondary timeframe zones visually distinct.
Core Features
Primary Order Blocks
The primary order block engine can run on the chart timeframe or on a custom timeframe selected in the settings. Bullish and bearish zones are detected from confirmed swing structure and are filtered by size using an ATR-based threshold to avoid excessively large zones.
Secondary Timeframe Order Blocks
An optional secondary timeframe can be enabled to display another layer of order block context on the same chart. This is useful for combining lower-timeframe execution with higher-timeframe structure, or for comparing two separate intraday/session perspectives.
Primary zones use the default bullish/bearish colors, while secondary zones use a contrasting blue/yellow palette so the two timeframe layers are easy to distinguish at a glance.
Liquidity Sweep Requirement
The indicator includes an optional liquidity sweep filter. When enabled, a bullish order block requires a prior sell-side liquidity sweep, and a bearish order block requires a prior buy-side liquidity sweep. This helps focus the script on setups where price has first taken liquidity before forming an order block.
Volumetric Information
Volumetric display can be enabled to show the total volume associated with each order block and a relative high/low volume balance percentage. When enabled, internal volume bars are drawn inside the zone:
- Primary timeframe volume bars use the primary bullish/bearish colors.
- Secondary timeframe volume bars use the secondary blue/yellow colors.
- Historic or breaker zones are displayed with a faded appearance.
Zone Invalidation
Zones can be invalidated by either wick or close, depending on the selected setting. When a zone is invalidated, it can either be hidden or shown as a historic/breaker zone if Show Historic Zones is enabled.
Zone Count Control
Both the primary and secondary timeframe layers have independent zone count settings:
- One
- Low
- Medium
- High
Higher settings show more historical zones, while lower settings keep the chart cleaner and may improve responsiveness.
Optional Zone Combining
The script can optionally combine overlapping zones of the same effective direction and timeframe. This can help reduce clutter in dense areas of price action. Combining is disabled by default for better performance and a more transparent view of individual zones, but it can be enabled from the settings.
Discount / Premium Range
An optional Discount / Premium overlay can be enabled to display a dealing range based on recent swing highs and lows. The range includes premium, discount, and equilibrium levels, and can be calculated on the chart timeframe or a custom higher timeframe.
Swing Point Display
For additional context, the script can show confirmed swing highs and swing lows used by the order block detection logic.
Performance-Oriented Defaults
The default configuration is designed to keep the chart responsive:
- Historic zones are off by default.
- Volumetric information is off by default.
- Zone combining is off by default.
- Secondary timeframe display is off by default.
These features can all be enabled manually if you want more detail or broader context.
Suggested Usage
Use the primary timeframe for the main execution or analysis timeframe. Enable the secondary timeframe when you want to overlay higher-timeframe or alternate-timeframe order blocks. For example, a trader may use the chart timeframe for active entries and enable a higher secondary timeframe to identify broader reaction zones.
The liquidity sweep requirement can be useful for filtering out weaker order blocks and focusing on zones formed after a liquidity event. If you prefer more zones and broader structure, you can disable this requirement.
Important Notes
This script is an analytical tool and should not be used as a standalone trading system. Order blocks can fail, repainting-style expectations should be avoided, and zones should be interpreted alongside market structure, trend context, liquidity, session timing, and risk management.
The indicator is intended to help visualize potential areas of interest, not to provide buy or sell signals.
Summary
Dual-Timeframe ICT & Volumized Order Blocks provides a clean and configurable way to monitor ICT-style order blocks across two timeframes, with optional liquidity filtering, volumetric zone information, historic breaker visualization, zone combining, and discount/premium context.
The script focuses on market structure context, liquidity-driven order block formation, optional volume information, and clean multi-timeframe visualization. It is built for traders who want to see where recent institutional-style displacement zones may exist, while keeping primary and secondary timeframe zones visually distinct.
Core Features
Primary Order Blocks
The primary order block engine can run on the chart timeframe or on a custom timeframe selected in the settings. Bullish and bearish zones are detected from confirmed swing structure and are filtered by size using an ATR-based threshold to avoid excessively large zones.
Secondary Timeframe Order Blocks
An optional secondary timeframe can be enabled to display another layer of order block context on the same chart. This is useful for combining lower-timeframe execution with higher-timeframe structure, or for comparing two separate intraday/session perspectives.
Primary zones use the default bullish/bearish colors, while secondary zones use a contrasting blue/yellow palette so the two timeframe layers are easy to distinguish at a glance.
Liquidity Sweep Requirement
The indicator includes an optional liquidity sweep filter. When enabled, a bullish order block requires a prior sell-side liquidity sweep, and a bearish order block requires a prior buy-side liquidity sweep. This helps focus the script on setups where price has first taken liquidity before forming an order block.
Volumetric Information
Volumetric display can be enabled to show the total volume associated with each order block and a relative high/low volume balance percentage. When enabled, internal volume bars are drawn inside the zone:
- Primary timeframe volume bars use the primary bullish/bearish colors.
- Secondary timeframe volume bars use the secondary blue/yellow colors.
- Historic or breaker zones are displayed with a faded appearance.
Zone Invalidation
Zones can be invalidated by either wick or close, depending on the selected setting. When a zone is invalidated, it can either be hidden or shown as a historic/breaker zone if Show Historic Zones is enabled.
Zone Count Control
Both the primary and secondary timeframe layers have independent zone count settings:
- One
- Low
- Medium
- High
Higher settings show more historical zones, while lower settings keep the chart cleaner and may improve responsiveness.
Optional Zone Combining
The script can optionally combine overlapping zones of the same effective direction and timeframe. This can help reduce clutter in dense areas of price action. Combining is disabled by default for better performance and a more transparent view of individual zones, but it can be enabled from the settings.
Discount / Premium Range
An optional Discount / Premium overlay can be enabled to display a dealing range based on recent swing highs and lows. The range includes premium, discount, and equilibrium levels, and can be calculated on the chart timeframe or a custom higher timeframe.
Swing Point Display
For additional context, the script can show confirmed swing highs and swing lows used by the order block detection logic.
Performance-Oriented Defaults
The default configuration is designed to keep the chart responsive:
- Historic zones are off by default.
- Volumetric information is off by default.
- Zone combining is off by default.
- Secondary timeframe display is off by default.
These features can all be enabled manually if you want more detail or broader context.
Suggested Usage
Use the primary timeframe for the main execution or analysis timeframe. Enable the secondary timeframe when you want to overlay higher-timeframe or alternate-timeframe order blocks. For example, a trader may use the chart timeframe for active entries and enable a higher secondary timeframe to identify broader reaction zones.
The liquidity sweep requirement can be useful for filtering out weaker order blocks and focusing on zones formed after a liquidity event. If you prefer more zones and broader structure, you can disable this requirement.
Important Notes
This script is an analytical tool and should not be used as a standalone trading system. Order blocks can fail, repainting-style expectations should be avoided, and zones should be interpreted alongside market structure, trend context, liquidity, session timing, and risk management.
The indicator is intended to help visualize potential areas of interest, not to provide buy or sell signals.
Summary
Dual-Timeframe ICT & Volumized Order Blocks provides a clean and configurable way to monitor ICT-style order blocks across two timeframes, with optional liquidity filtering, volumetric zone information, historic breaker visualization, zone combining, and discount/premium context.
Phát hành các Ghi chú
Updated chart and author line.Phát hành các Ghi chú
Bug fixes and UI improvements.Phát hành các Ghi chú
Added entry signals.Phát hành các Ghi chú
Improved OB detection when large OB is detected.Phát hành các Ghi chú
Fixed require liquidity sweep logic.Phát hành các Ghi chú
Added support for Multi-Candle OBsPhát hành các Ghi chú
Fix small bug in Multi-Candle OBsPhát hành các Ghi chú
Updated OB detection logicPhát hành các Ghi chú
Added "Filter Large OBs" setting which is now disabled by default. Before, large OBs that went beyond 3.5 ATR were filtered out. Now they are included, but can be hidden with this setting.Phát hành các Ghi chú
Minor settings label update.Phát hành các Ghi chú
Reorganized settings.Phát hành các Ghi chú
Updated Require Liquidity Sweep setting to use swing liquidity and not just local liquidity.Phát hành các Ghi chú
Fixed an issue with OB detection logic.Phát hành các Ghi chú
Optimized swing detection.Phát hành các Ghi chú
Updated Constrain logic.Phát hành các Ghi chú
Updated settings labels.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.