OPEN-SOURCE SCRIPT
Institutional IOF Zones

The Institutional IOF (Order Flow) Zones - Pro is a high-precision technical indicator designed to identify and track "Smart Money" interest through the mathematical lens of Candlestick Imbalance and Momentum Displacement. Unlike standard Supply/Demand indicators, this script requires a specific "Cause and Effect" relationship before a zone is validated, filtering out market noise and focus on high-probability institutional footprints.
The Mathematical Framework
The indicator operates on two primary quantitative filters to validate a zone:
1. Imbalance Detection (The Cause)
The script identifies "Imbalance Candles" (Dojis, Hammers, Spinning Tops) where the market is in a state of high compression or indecision.
Total Range (R) = High - Low
Body Size (B) = |Close - Open|
Wick Ratio (W) = (R - B) / R
Criterion: A candle is marked for potential imbalance ONLY IF W > Threshold (Default 50%). This ensures the candle represents a battleground of orders where wicks dominate the body.
2. Displacement Validation (The Effect)
An imbalance candle is only meaningful if it is followed by an institutional "run." The following candle (Index 0) must show significant Displacement:
Momentum Ratio (M) = B / R
Criterion: The breakout candle must satisfy M > 0.60. Mathematically, this means the body must occupy at least 60% of the total candle range, proving that one side of the market has overwhelmed the other with high-volume intent.
Zone Physics & Institutional Order Flow (IOF)
Once validated, the zone is projected forward using specific price coordinates:
Demand Zone (Bullish): Top = Close of Imbalance Candle; Bottom = Low of Imbalance Candle.
Supply Zone (Bearish): Top = High of Imbalance Candle; Bottom = Close of Imbalance Candle.
Mitigation & Flip Logic (Dynamic Calculus)
The indicator tracks price interaction with these zones in real-time:
Mitigation: If Price (P) enters the zone (P < Zone Top for Demand), the state transitions to "Mitigated." This suggests the "unfilled orders" have been tapped.
The Flip (Breaker Logic): If Price (P) entirely violates the zone (P < Zone Bottom for Demand), the zone mathematically "Flips."
Bullish -> Bearish: Becomes a Supply zone.
Bearish -> Bullish: Becomes a Demand zone.
Fibonacci & Internal Defense Levels
Within each zone, the script calculates internal mathematical equilibrium points:
Midline (Equilibrium): (Zone Top + Zone Bottom) / 2
Golden Pocket (GP): Zone Top - (Range * 0.618)
Optimal Trade Entry (OTE): Zone Top - (Range * 0.705)
These levels act as high-sensitivity areas where institutions typically re-accumulate or distribute positions.
The Mathematical Framework
The indicator operates on two primary quantitative filters to validate a zone:
1. Imbalance Detection (The Cause)
The script identifies "Imbalance Candles" (Dojis, Hammers, Spinning Tops) where the market is in a state of high compression or indecision.
Total Range (R) = High - Low
Body Size (B) = |Close - Open|
Wick Ratio (W) = (R - B) / R
Criterion: A candle is marked for potential imbalance ONLY IF W > Threshold (Default 50%). This ensures the candle represents a battleground of orders where wicks dominate the body.
2. Displacement Validation (The Effect)
An imbalance candle is only meaningful if it is followed by an institutional "run." The following candle (Index 0) must show significant Displacement:
Momentum Ratio (M) = B / R
Criterion: The breakout candle must satisfy M > 0.60. Mathematically, this means the body must occupy at least 60% of the total candle range, proving that one side of the market has overwhelmed the other with high-volume intent.
Zone Physics & Institutional Order Flow (IOF)
Once validated, the zone is projected forward using specific price coordinates:
Demand Zone (Bullish): Top = Close of Imbalance Candle; Bottom = Low of Imbalance Candle.
Supply Zone (Bearish): Top = High of Imbalance Candle; Bottom = Close of Imbalance Candle.
Mitigation & Flip Logic (Dynamic Calculus)
The indicator tracks price interaction with these zones in real-time:
Mitigation: If Price (P) enters the zone (P < Zone Top for Demand), the state transitions to "Mitigated." This suggests the "unfilled orders" have been tapped.
The Flip (Breaker Logic): If Price (P) entirely violates the zone (P < Zone Bottom for Demand), the zone mathematically "Flips."
Bullish -> Bearish: Becomes a Supply zone.
Bearish -> Bullish: Becomes a Demand zone.
Fibonacci & Internal Defense Levels
Within each zone, the script calculates internal mathematical equilibrium points:
Midline (Equilibrium): (Zone Top + Zone Bottom) / 2
Golden Pocket (GP): Zone Top - (Range * 0.618)
Optimal Trade Entry (OTE): Zone Top - (Range * 0.705)
These levels act as high-sensitivity areas where institutions typically re-accumulate or distribute positions.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.