Institutional Order Flow Zones [JOAT]Institutional Order Flow Zones โ Smart Money Structure & Liquidity Engine
IMPORTANT NOTES (READ FIRST)
This is an indicator (not a strategy). It does not place trades. It provides a structural map of institutional activity.
This script is written in Pine Script v6 and is intended to be used on standard candlestick charts .
Source code visibility: This script is published as Protected Source (closed-source) . The purpose is to protect the work from unauthorized re-uploads/copies and to maintain a stable versioning path. This description is intentionally detailed so you can understand what the indicator does and how to use each feature without needing access to the implementation.
Protected Source / Closed-Source Clarification
Protected source does not mean "trust me blindly". It means the internal implementation is not publicly viewable.
The operational behavior is documented here: what is plotted, what each dashboard cell means, what each input controls, and how to interpret the output.
If you see re-uploads or near-identical copies elsewhere, treat them with caution and rely on the official publication.
Overview
Institutional Order Flow Zones (IOFZ) is a Smart Money Concepts (SMC) overlay that reveals institutional activity through:
Supply & Demand Zones โ automatically detected order blocks based on swing structure + order flow confirmation
Fair Value Gaps (FVGs) โ three-candle displacement inefficiencies that act as magnets or continuation footprints
Break of Structure (BOS) โ confirmed structural shifts when price closes beyond key swing levels
Liquidity Detection โ high-volume interactions at swing highs/lows where stops are likely harvested
Order Flow Imbalance โ buy vs sell volume pressure approximation over a rolling window
The goal is to provide a clean, information-dense overlay that highlights where institutions are likely accumulating, distributing, or harvesting liquidity.
What Makes It Original (Originality & Usefulness)
This script is not a simple mashup of SMC concepts. It is a coordinated workflow:
Swing-Based Structure Engine caches recent pivots so the script always knows the last confirmed high/low and the ones they replaced
Order Flow Imbalance splits candles into buying/selling volume to produce a directional pressure score
Zone Creation Logic requires both swing structure AND order flow confirmation (demand = swing low + buy pressure; supply = swing high + sell pressure)
FVG Detection uses minimum size filtering and auto-deletion when gaps are filled
BOS Detection requires price to close through levels (not just wick) with bar-spacing cooldown to prevent spam
Lifecycle Management automatically retires old zones and limits active objects to keep charts clean
The combination creates a structural map that adapts to market conditions rather than flooding the chart with every possible level.
1) Chart Visuals โ What You See on the Chart
A) Demand & Supply Zones (Order Blocks)
Demand Zones โ created when a swing low forms under strong net buy pressure (OFI > 30%)
Drawn as extended rectangles projecting forward in time
Soft gradient fill tuned to theme (default: teal/cyan tones)
Internal label shows "DEMAND" with price range
Supply Zones โ created when a swing high forms under strong net sell pressure (OFI < -30%)
Drawn as extended rectangles projecting forward in time
Soft gradient fill tuned to theme (default: orange/amber tones)
Internal label shows "SUPPLY" with price range
On Lower TF Forex:
How to use:
In uptrends, prioritize demand zones for long entries
In downtrends, prioritize supply zones for short entries
Fresh, untested zones carry more information than heavily traded ones
B) Fair Value Gaps (FVGs)
Three-candle displacement legs where price leaves an inefficiency:
Bullish FVG โ low of current bar sits above high from two bars ago (upside gap in impulsive move)
Bearish FVG โ high of current bar sits below low from two bars ago (downside gap)
Visual elements:
Extended rectangles stretching forward in time
Centered label ("Bull FVG" or "Bear FVG") with dark text for readability
Dotted guide line connecting label to gap
Auto-delete when price fully trades back through the gap (filled)
C) Break of Structure (BOS)
Detected when price convincingly closes beyond the last key swing high or swing low:
Tracks the previous confirmed swing , not just any local wick
Requires price to close through the level (filters shallow wicks)
Uses 10-bar minimum cooldown between signals (prevents spam)
Visual elements:
Horizontal level drawn from original break point, extending into future
Compact label ("Bull BOS" or "Bear BOS") positioned with offset
Dotted guide line dropping into the level
D) Liquidity Sweeps
High-volume interactions around prior swing highs/lows:
Dashed horizontal line at the sweep level
Small label reading "Liquidity Sweep" above (swing highs) or below (swing lows)
Highlights where stops are likely cleaned out before reversals or continuations
E) Order Flow Background Tint
Subtle background coloring based on order flow imbalance:
Strong buy pressure (OFI > 30%) = faint demand color tint
Strong sell pressure (OFI < -30%) = faint supply color tint
Neutral = no tint
Bear FVG, and Bear BOS:
2) IOFZ Analysis Dashboard โ Full Glossary
A compact table in the top-right corner displays:
Row 1 โ Order Flow
Shows NEUTRAL, BUYING, or SELLING with signed percentage
Calculated by splitting recent candles into buy/sell volume based on close vs open
Rolling 20-period window
Strong thresholds: +/-30%
Row 2 โ Demand Zones
Count of active demand boxes currently on chart
Maximum 10 active zones (older ones auto-retire)
Row 3 โ Supply Zones
Count of active supply boxes currently on chart
Maximum 10 active zones (older ones auto-retire)
Row 4 โ Structure
BULLISH : Most recent BOS was bullish (within 50 bars)
BEARISH : Most recent BOS was bearish (within 50 bars)
RANGING : No recent BOS or mixed signals
Row 5 โ Fair Value Gaps
Count of active, unfilled FVGs on chart
Maximum 15 active FVGs (older ones auto-retire)
Shows "NONE" if no active gaps
Row 6 โ Liquidity
HIGH VOLUME : Current volume > average x liquidity threshold
NORMAL : Volume within normal range
Demand Zone:
3) How the Detection Engines Work (High-Level)
Swing Detection:
Uses configurable pivot length (default: 10 bars)
Swing high = highest bar in lookback window on both sides
Swing low = lowest bar in lookback window on both sides
Caches last swing and previous swing for BOS detection
Order Flow Imbalance Calculation:
For each of the last 20 candles: if close > open, add volume to buyVolume; else add to sellVolume
OFI = (buyVolume - sellVolume) / totalVolume
Result ranges from -1.0 (100% sell) to +1.0 (100% buy)
Zone Creation Logic:
Demand: swing low detected AND OFI > 0.3 (strong buy pressure)
Supply: swing high detected AND OFI < -0.3 (strong sell pressure)
Zone boundaries = high and low of the swing candle
FVG Detection Logic:
Bullish: low > high AND close > close AND gap size >= minimum %
Bearish: high < low AND close < close AND gap size >= minimum %
Filled when price trades through the gap (bullish: low <= gap bottom; bearish: high >= gap top)
BOS Detection Logic:
Bullish: close > previous swing high AND close <= previous swing high AND 10+ bars since last bullish BOS
Bearish: close < previous swing low AND close >= previous swing low AND 10+ bars since last bearish BOS
4) Inputs & Settings โ Full Reference
Order Flow Zones
Swing Detection Length (default: 10): Sensitivity of swing highs/lows. Shorter = more local structure; longer = major turning points.
Minimum Zone Strength (default: 3): Conceptual threshold for zone robustness.
Show Demand Zones : Toggle demand zone visibility.
Show Supply Zones : Toggle supply zone visibility.
Liquidity Detection
Show Liquidity Levels : Toggle liquidity sweep markers.
Liquidity Lookback (default: 50): Period for volume baseline calculation.
Liquidity Threshold (default: 1.5): Multiplier defining "high volume" (current volume > average x threshold).
Fair Value Gaps
Show Fair Value Gaps : Toggle FVG visibility.
Minimum FVG Size % (default: 0.5%): Filter out very small gaps.
Market Structure
Show Break of Structure : Toggle BOS annotations.
Visual Settings
Color Theme : Classic, Deep Purple, Sweden, Ocean, or Monokai.
Zone Transparency (default: 80): Controls fill opacity for zones.
5) Recommended Workflow (Practical Use)
For Scalping:
Swing Length: 5
Zone Strength: 2
Liquidity Lookback: 30
For Day Trading:
Swing Length: 10 (default)
Zone Strength: 3 (default)
Liquidity Lookback: 50 (default)
For Swing Trading:
Swing Length: 20
Zone Strength: 4
Liquidity Lookback: 100
Step-by-Step Usage:
Step 1 โ Identify dominant structure using BOS levels and Structure readout
Step 2 โ In uptrends, prioritize demand zones and bullish liquidity sweeps
Step 3 โ In downtrends, prioritize supply zones and bearish sweeps
Step 4 โ Look for confluence: price sweeping into zone + order flow confirmation
Step 5 โ Use FVGs as context (magnets/continuation footprints), not standalone signals
Step 6 โ Manage risk externally (IOFZ is a structural map, not a risk engine)
6) Alerts
IOFZ ships with alert conditions for:
IOFZ Bullish BOS : Bullish break of structure detected
IOFZ Bearish BOS : Bearish break of structure detected
IOFZ Bullish FVG : Bullish fair value gap detected
IOFZ Bearish FVG : Bearish fair value gap detected
Recommended: Attach alerts to "Once Per Bar Close" to avoid intra-bar noise.
7) Limitations & Best-Use Guidance
IOFZ is a structural map, not an auto-trader. It highlights context; execution and risk management remain your responsibility.
Zone, BOS, and FVG definitions follow one specific institutional interpretation. Other methodologies will differ.
Real-time signals may update on the forming bar. When in doubt, make decisions on closed candles.
Low-liquidity or highly erratic markets can produce weaker levels and more noise.
Volume-based logic depends on the quality of volume data for the symbol/exchange.
Always validate on your own symbols and timeframes before committing capital.
Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice. Trading involves risk, and you are responsible for your own decisions, sizing, and risk controls. Always test settings and workflows in a simulated environment before using them in live markets.
-Made with passion by officialjackofalltrades
Penunjuk Pine Scriptยฎ






















