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.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.