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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.