OPEN-SOURCE SCRIPT
TCT OBIF Detector

█ OVERVIEW
The OBIF (Order Block Imbalance Fill) indicator automatically detects and visualizes high-probability trading zones by combining two powerful Smart Money Concepts: Order Blocks and Fair Value Gaps (FVGs).
An OBIF occurs when an Order Block forms immediately before a Fair Value Gap, creating a zone of institutional interest that price often revisits before continuing its move.
█ CONCEPTS
Order Block (OB)
An Order Block is the last opposing candle before a strong directional move. It represents an area where institutional traders likely placed orders.
- Bullish OB: Last bearish candle before an up-move
- Bearish OB: Last bullish candle before a down-move
Fair Value Gap (FVG)
An FVG is a price imbalance created when a candle's body completely gaps past the previous candle's range, leaving an unfilled area.
- Bullish FVG: Gap up where candle[0].low > candle[2].high
- Bearish FVG: Gap down where candle[0].high < candle[2].low
OBIF Zone
When an Order Block directly precedes an FVG, it creates an OBIF - a confluence zone with higher probability of acting as support/resistance.
█ HOW TO USE
1. Identify the Trend
Use OBIFs in the direction of the higher timeframe trend for best results.
2. Wait for Price to Return
OBIFs act as magnets - price often returns to fill the imbalance and test the order block.
3. Look for Confirmation
When price enters an OBIF zone, look for:
- Rejection wicks
- Engulfing patterns
- Break of structure on lower timeframes
4. Mitigation
Once price fully trades through the OBIF (touches the opposite edge), the zone is considered mitigated and loses its significance.
█ FEATURES
- Automatic Detection — Identifies OBIFs in real-time as they form
- Visual Zones — Clean, non-intrusive boxes that don't obscure price action
- Mitigation Tracking — Zones automatically update when price mitigates them
- Multi-Timeframe Friendly — Works on any timeframe from 1m to Monthly
- Customizable — Adjust colors, opacity, and display preferences
█ SETTINGS
- Lookback Window — How many candles back to search for the Order Block (default: 3)
- Show Bullish/Bearish — Toggle visibility of each type
- Show Mitigated — Display zones that have been mitigated (shown in gray)
- Fill Opacity — Adjust zone transparency (higher = more see-through)
- Border Width — Thickness of zone borders
█ BEST PRACTICES
✓ Use on higher timeframes (1H+) for more reliable zones
✓ Combine with market structure analysis
✓ Look for OBIFs at key support/resistance levels
✓ Use lower timeframe confirmation for entries
✗ Don't trade every OBIF blindly
✗ Avoid OBIFs against the dominant trend
█ CREDITS
The Composite Trader (TCT) methodologies.
The OBIF (Order Block Imbalance Fill) indicator automatically detects and visualizes high-probability trading zones by combining two powerful Smart Money Concepts: Order Blocks and Fair Value Gaps (FVGs).
An OBIF occurs when an Order Block forms immediately before a Fair Value Gap, creating a zone of institutional interest that price often revisits before continuing its move.
█ CONCEPTS
Order Block (OB)
An Order Block is the last opposing candle before a strong directional move. It represents an area where institutional traders likely placed orders.
- Bullish OB: Last bearish candle before an up-move
- Bearish OB: Last bullish candle before a down-move
Fair Value Gap (FVG)
An FVG is a price imbalance created when a candle's body completely gaps past the previous candle's range, leaving an unfilled area.
- Bullish FVG: Gap up where candle[0].low > candle[2].high
- Bearish FVG: Gap down where candle[0].high < candle[2].low
OBIF Zone
When an Order Block directly precedes an FVG, it creates an OBIF - a confluence zone with higher probability of acting as support/resistance.
█ HOW TO USE
1. Identify the Trend
Use OBIFs in the direction of the higher timeframe trend for best results.
2. Wait for Price to Return
OBIFs act as magnets - price often returns to fill the imbalance and test the order block.
3. Look for Confirmation
When price enters an OBIF zone, look for:
- Rejection wicks
- Engulfing patterns
- Break of structure on lower timeframes
4. Mitigation
Once price fully trades through the OBIF (touches the opposite edge), the zone is considered mitigated and loses its significance.
█ FEATURES
- Automatic Detection — Identifies OBIFs in real-time as they form
- Visual Zones — Clean, non-intrusive boxes that don't obscure price action
- Mitigation Tracking — Zones automatically update when price mitigates them
- Multi-Timeframe Friendly — Works on any timeframe from 1m to Monthly
- Customizable — Adjust colors, opacity, and display preferences
█ SETTINGS
- Lookback Window — How many candles back to search for the Order Block (default: 3)
- Show Bullish/Bearish — Toggle visibility of each type
- Show Mitigated — Display zones that have been mitigated (shown in gray)
- Fill Opacity — Adjust zone transparency (higher = more see-through)
- Border Width — Thickness of zone borders
█ BEST PRACTICES
✓ Use on higher timeframes (1H+) for more reliable zones
✓ Combine with market structure analysis
✓ Look for OBIFs at key support/resistance levels
✓ Use lower timeframe confirmation for entries
✗ Don't trade every OBIF blindly
✗ Avoid OBIFs against the dominant trend
█ CREDITS
The Composite Trader (TCT) methodologies.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.