OPEN-SOURCE SCRIPT
Institutional Flow Sentinel [JOAT]

Institutional Flow Sentinel [JOAT]
Introduction
Institutional Flow Sentinel is an open-source market structure tool that tracks two categories of price behavior that institutional order flow leaves behind: Fair Value Gaps and liquidity sweeps. Both concepts originate from ICT (Inner Circle Trader) methodology, but this implementation combines them into a single unified engine with a live zone lifecycle, composite state tracking, and candle coloring — none of which are standard in most published FVG or sweep tools individually.
The core insight is that large participants need liquidity to fill orders. They engineer moves through external swing highs and lows to trigger retail stop orders, collect that liquidity, then reverse. Identifying these events in real time, tracking whether the gap or sweep level has been respected or violated, and classifying the current order flow bias from those events is the purpose of this indicator.

Core Concepts
1. Fair Value Gap Detection
A Fair Value Gap is a three-candle imbalance where the middle candle's range is not overlapped by the adjacent candles. Bullish FVGs form when a candle's low is above the high two bars prior. Bearish FVGs form when a candle's high is below the low two bars prior:
Pine Script®
Each gap is stored with its price bounds and tracked bar-by-bar. If price returns and closes inside the gap the zone is marked mitigated and drawn differently. Unmitigated gaps project forward as active imbalance reference levels.
2. Liquidity Sweep Detection
The indicator tracks pivot highs as Buyside Liquidity (BSL) and pivot lows as Sellside Liquidity (SSL). A sweep occurs when price wicks through the level but then closes back inside it — indicating the liquidity was taken and price rejected:
Pine Script®
Sweep events are labeled on the chart and contribute to the cumulative order flow bias score.
3. Composite Bias Score
Each confirmed FVG and sweep increments or decrements a running bias counter. Bullish FVGs and bearish sweeps (stops run below, reversal up) add positive weight. Bearish FVGs and bullish sweeps add negative weight. The dashboard displays this composite score alongside the current structural bias.
4. Zone Lifecycle Management
Active FVG zones are extended bar by bar. When price mitigates a zone (closes inside it), the zone rendering switches to a dimmed style but remains visible as a historical reference. The indicator tracks the count of active unmitigated gaps on each side and displays them in the dashboard.
Features
Input Parameters
Structure Detection:
Display:
How to Use This Indicator
Step 1: Identify Active Imbalances
Unmitigated FVG boxes mark price areas where a directional move was so strong that no two-sided trading occurred. Price tends to return and fill these gaps. Use them as magnet targets or potential reversal zones.
Step 2: Watch for Sweep Events
When a sweep label appears at a prior swing level, the indicator is signaling that liquidity at that level was collected. Sweeps followed by a strong close in the opposite direction are high-probability reversal setups.
Step 3: Read the Bias Score
The composite score in the dashboard quantifies accumulated institutional signals. A strongly positive score suggests the order flow is biased bullish; strongly negative suggests bearish. Use this as a directional filter.
Indicator Limitations
Originality Statement
This indicator is original in combining FVG zone lifecycle management, pivot-based liquidity sweep detection, and a composite order flow bias score into a single Pine Script v6 publication. The zone mitigation tracking system, which distinguishes between active and mitigated imbalances while keeping both visible with different rendering, is not present in most standalone FVG tools on TradingView.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. All signals are based on historical price data and do not guarantee future results. Always use proper risk management.
-Made with passion by jackofalltrades
Introduction
Institutional Flow Sentinel is an open-source market structure tool that tracks two categories of price behavior that institutional order flow leaves behind: Fair Value Gaps and liquidity sweeps. Both concepts originate from ICT (Inner Circle Trader) methodology, but this implementation combines them into a single unified engine with a live zone lifecycle, composite state tracking, and candle coloring — none of which are standard in most published FVG or sweep tools individually.
The core insight is that large participants need liquidity to fill orders. They engineer moves through external swing highs and lows to trigger retail stop orders, collect that liquidity, then reverse. Identifying these events in real time, tracking whether the gap or sweep level has been respected or violated, and classifying the current order flow bias from those events is the purpose of this indicator.
Core Concepts
1. Fair Value Gap Detection
A Fair Value Gap is a three-candle imbalance where the middle candle's range is not overlapped by the adjacent candles. Bullish FVGs form when a candle's low is above the high two bars prior. Bearish FVGs form when a candle's high is below the low two bars prior:
Each gap is stored with its price bounds and tracked bar-by-bar. If price returns and closes inside the gap the zone is marked mitigated and drawn differently. Unmitigated gaps project forward as active imbalance reference levels.
2. Liquidity Sweep Detection
The indicator tracks pivot highs as Buyside Liquidity (BSL) and pivot lows as Sellside Liquidity (SSL). A sweep occurs when price wicks through the level but then closes back inside it — indicating the liquidity was taken and price rejected:
Sweep events are labeled on the chart and contribute to the cumulative order flow bias score.
3. Composite Bias Score
Each confirmed FVG and sweep increments or decrements a running bias counter. Bullish FVGs and bearish sweeps (stops run below, reversal up) add positive weight. Bearish FVGs and bullish sweeps add negative weight. The dashboard displays this composite score alongside the current structural bias.
4. Zone Lifecycle Management
Active FVG zones are extended bar by bar. When price mitigates a zone (closes inside it), the zone rendering switches to a dimmed style but remains visible as a historical reference. The indicator tracks the count of active unmitigated gaps on each side and displays them in the dashboard.
Features
- Real-time FVG detection: Bullish and bearish imbalances identified and drawn as price-bound boxes
- FVG mitigation tracking: Zones update styling when price returns into the gap
- BSL and SSL level tracking: Pivot-based liquidity levels updated each bar
- Sweep event labels: On-chart labels at every confirmed liquidity sweep with direction
- Composite order flow bias: Running score combining FVG and sweep events
- Candle coloring: Candles painted by current bias state (bullish / bearish / neutral)
- Institutional dashboard: Top-right table showing active FVGs, sweep count, and bias score
- All signals on confirmed bars: barstate.isconfirmed throughout — no repainting
Input Parameters
Structure Detection:
- Pivot Lookback: Bars required on each side for BSL/SSL pivot confirmation (default: 5)
- Max Active FVGs: Maximum simultaneous FVG zones drawn per side (default: 3)
Display:
- Show FVG Zones toggle
- Show Sweep Labels toggle
- Show Candle Color toggle
- Show Dashboard toggle
How to Use This Indicator
Step 1: Identify Active Imbalances
Unmitigated FVG boxes mark price areas where a directional move was so strong that no two-sided trading occurred. Price tends to return and fill these gaps. Use them as magnet targets or potential reversal zones.
Step 2: Watch for Sweep Events
When a sweep label appears at a prior swing level, the indicator is signaling that liquidity at that level was collected. Sweeps followed by a strong close in the opposite direction are high-probability reversal setups.
Step 3: Read the Bias Score
The composite score in the dashboard quantifies accumulated institutional signals. A strongly positive score suggests the order flow is biased bullish; strongly negative suggests bearish. Use this as a directional filter.
Indicator Limitations
- FVGs form on every timeframe and many will not be mitigated; not every gap is tradeable
- Sweep detection uses close-back confirmation which adds one bar of delay
- The bias score is a heuristic, not a statistically validated predictor of future direction
- This indicator identifies market structure events; it does not generate entry or exit signals
Originality Statement
This indicator is original in combining FVG zone lifecycle management, pivot-based liquidity sweep detection, and a composite order flow bias score into a single Pine Script v6 publication. The zone mitigation tracking system, which distinguishes between active and mitigated imbalances while keeping both visible with different rendering, is not present in most standalone FVG tools on TradingView.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. All signals are based on historical price data and do not guarantee future results. Always use proper risk management.
-Made with passion by jackofalltrades
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.