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提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。