PROTECTED SOURCE SCRIPT
DuoBlocks — ICT Order Block Detector

DuoBlocks — ICT Order Block Detector
⚪ Overview
DuoBlocks detects bullish and bearish Order Blocks that form immediately under/over a valid Fair Value Gap. Each zone inherits its height from ATR, so the OB reflects realistic volatility instead of fixed candlestick based values. This makes the zones more adaptive, cleaner, and more faithful to ICT(Inner Circle Trader)-style OB identification.
The indicator displays only the most relevant live block — the one that price is most likely to interact with next.
⚪ Core Logic
DuoBlocks evaluates a two-bar displacement to confirm a real gap (FVG behavior). When a valid upward or downward gap forms, it captures the origin candle as the potential OB and builds the zone using:
• ATR-based height → natural volatility-scaled zone width
• Gap validation above/below price → ensures it’s a true imbalance
• ICT-style logic → the OB sits directly behind the displacement/FVG
• Adaptive time-frame filter → different gap thresholds for <1h and ≥1h charts
• Lookback limit → prevents ancient blocks from cluttering the chart
• Automatic invalidation → block dies if price breaks its boundary
Only surviving blocks remain active, giving a clean and trustworthy supply/demand map.
⚪ Block Selection Engine
When multiple OBs exist, DuoBlocks automatically picks the most relevant:
Bearish OB (supply)
• Must sit above current price
• Chooses the nearest one overhead
• If equal → prefers the newest
• Optional fallback to the closest OB if none sit above price
Bullish OB (demand)
• Must sit below current price
• Chooses the nearest underfoot OB
• If equal → prefers the newest
• Optional fallback enabled in no-OB conditions
⚪ Midline System
Each active OB can show a “midline” at its exact center:
⚪ Inputs & Controls
• ATR length
• Right-side zone extension
• Lookback depth
• Max stored OBs per side
• Optional nearest-fallback
• Toggleable midline + width control
• Custom bull/bear colors
Disclaimer
This script is for educational purposes only and is not financial advice. Trading involves risk, and you are fully responsible for your decisions and results.
⚪ Overview
DuoBlocks detects bullish and bearish Order Blocks that form immediately under/over a valid Fair Value Gap. Each zone inherits its height from ATR, so the OB reflects realistic volatility instead of fixed candlestick based values. This makes the zones more adaptive, cleaner, and more faithful to ICT(Inner Circle Trader)-style OB identification.
The indicator displays only the most relevant live block — the one that price is most likely to interact with next.
⚪ Core Logic
DuoBlocks evaluates a two-bar displacement to confirm a real gap (FVG behavior). When a valid upward or downward gap forms, it captures the origin candle as the potential OB and builds the zone using:
• ATR-based height → natural volatility-scaled zone width
• Gap validation above/below price → ensures it’s a true imbalance
• ICT-style logic → the OB sits directly behind the displacement/FVG
• Adaptive time-frame filter → different gap thresholds for <1h and ≥1h charts
• Lookback limit → prevents ancient blocks from cluttering the chart
• Automatic invalidation → block dies if price breaks its boundary
Only surviving blocks remain active, giving a clean and trustworthy supply/demand map.
⚪ Block Selection Engine
When multiple OBs exist, DuoBlocks automatically picks the most relevant:
Bearish OB (supply)
• Must sit above current price
• Chooses the nearest one overhead
• If equal → prefers the newest
• Optional fallback to the closest OB if none sit above price
Bullish OB (demand)
• Must sit below current price
• Chooses the nearest underfoot OB
• If equal → prefers the newest
• Optional fallback enabled in no-OB conditions
⚪ Midline System
Each active OB can show a “midline” at its exact center:
⚪ Inputs & Controls
• ATR length
• Right-side zone extension
• Lookback depth
• Max stored OBs per side
• Optional nearest-fallback
• Toggleable midline + width control
• Custom bull/bear colors
Disclaimer
This script is for educational purposes only and is not financial advice. Trading involves risk, and you are fully responsible for your decisions and results.
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。