OPEN-SOURCE SCRIPT
Institutional Flow Detector

Overview
InstFlow 1S Delta identifies institutional order flow by analyzing volume anomalies and directional bias using 1-second sub-bar data. The indicator detects when large players are likely entering or exiting positions, providing actionable trade recommendations with confidence scoring.
Unlike traditional volume indicators that only show total volume, InstFlow breaks down each bar into 1-second micro-bars, classifies buying vs selling pressure, and identifies statistically significant volume events that likely represent institutional activity.
How It Works
1-Second Delta Analysis
The indicator fetches all 1-second bars within each candle and classifies each micro-bar as buying (close ≥ open) or selling (close < open). This achieves ~85-90% directional accuracy compared to ~55-65% from traditional bar-based methods.
Delta = Buy Volume - Sell Volume
Delta Ratio = |Delta| / Total Volume
Volume Anomaly Detection (Z-Score)
Volume is compared to a rolling 20-bar average using statistical z-scores:
- T1: Z-Score ≥ 1.5 (top ~7% of volume bars)
- T2: Z-Score ≥ 2.0 (top ~2% of volume bars)
- T3: Z-Score ≥ 3.0 (top ~0.1% of volume bars)
Signal Types
- Big Trades (T1/T2/T3): Unusual volume with clear directional bias
- Absorption (ABS): High volume + small price move + delta imbalance = hidden liquidity absorbing orders
- Exhaustion (EXH): Capitulation pattern - big flush followed by immediate reversal with opposing delta
- Divergence (DIV): Price and cumulative delta disagreeing over 5 bars
ACTION Recommendation System
Synthesizes all signals into a single trade direction (LONG/SHORT/WAIT) with confidence scoring (1-10):
- Exhaustion signals: +5 points (strongest reversal)
- Counter-trend absorption: +4 points
- Volume tier: +1 to +3 points
- Divergence confirmation: +2 points
- Strong trend (ADX>30): +1 point
- High delta imbalance (>50%): +1 point
Features
Settings Guide
Detection Settings
1-Second Delta
Absorption Detection
Exhaustion Detection
Divergence Detection
How to Use
Visual Guide
Best Practices
Limitations
Disclaimer
This indicator is for educational and informational purposes only. It does not constitute financial advice.
InstFlow 1S Delta identifies institutional order flow by analyzing volume anomalies and directional bias using 1-second sub-bar data. The indicator detects when large players are likely entering or exiting positions, providing actionable trade recommendations with confidence scoring.
Unlike traditional volume indicators that only show total volume, InstFlow breaks down each bar into 1-second micro-bars, classifies buying vs selling pressure, and identifies statistically significant volume events that likely represent institutional activity.
How It Works
1-Second Delta Analysis
The indicator fetches all 1-second bars within each candle and classifies each micro-bar as buying (close ≥ open) or selling (close < open). This achieves ~85-90% directional accuracy compared to ~55-65% from traditional bar-based methods.
Delta = Buy Volume - Sell Volume
Delta Ratio = |Delta| / Total Volume
Volume Anomaly Detection (Z-Score)
Volume is compared to a rolling 20-bar average using statistical z-scores:
- T1: Z-Score ≥ 1.5 (top ~7% of volume bars)
- T2: Z-Score ≥ 2.0 (top ~2% of volume bars)
- T3: Z-Score ≥ 3.0 (top ~0.1% of volume bars)
Signal Types
- Big Trades (T1/T2/T3): Unusual volume with clear directional bias
- Absorption (ABS): High volume + small price move + delta imbalance = hidden liquidity absorbing orders
- Exhaustion (EXH): Capitulation pattern - big flush followed by immediate reversal with opposing delta
- Divergence (DIV): Price and cumulative delta disagreeing over 5 bars
ACTION Recommendation System
Synthesizes all signals into a single trade direction (LONG/SHORT/WAIT) with confidence scoring (1-10):
- Exhaustion signals: +5 points (strongest reversal)
- Counter-trend absorption: +4 points
- Volume tier: +1 to +3 points
- Divergence confirmation: +2 points
- Strong trend (ADX>30): +1 point
- High delta imbalance (>50%): +1 point
Features
- Real-time 1-second delta classification for accurate buy/sell detection
- Statistical volume anomaly detection adapts to each instrument
- Absorption detection finds hidden liquidity/iceberg orders
- Exhaustion patterns catch capitulation reversals
- Delta divergence warns of weakening moves
- ACTION + Confidence system provides clear trade recommendations
- Price-locked markers stay fixed at detection level (don't float)
- Info table displays all metrics in real-time
- RTH session filtering
- Comprehensive alert conditions
Settings Guide
Detection Settings
- Volume Lookback (20): Bars for calculating average volume and standard deviation
- T1/T2/T3 Thresholds: Z-score thresholds for volume tiers. Lower = more signals.
1-Second Delta
- Delta Resolution (1S): Use 1S for ES/NQ. Try 5S if 1S unavailable.
- Min Delta Imbalance (10%): Minimum ratio to classify direction.
Absorption Detection
- Min Volume Multiple (1.2x): Volume must exceed average by this multiple
- Max Price Move Multiple (0.5x): Price move must be less than this × average range
- Delta Imbalance Threshold (20%): Minimum delta ratio for absorption
Exhaustion Detection
- Minimum Tier for Flush (T1): Required volume tier for the flush bar
- New High/Low Lookback (10): Bars to check for price extremes
- Min Reversal Size (0.3x ATR): Required body size for reversal bar
Divergence Detection
- Divergence Lookback (5): Bars to compare price vs cumulative delta
- Delta Trend Threshold (0.4): Sensitivity for divergence detection
How to Use
- Add to ES, NQ, MES, or MNQ chart (1-5 minute timeframe)
- Check 1S Data quality in table (green = 30+ bars = reliable)
- Monitor ACTION field for trade direction
- Use Confidence score for position sizing: HIGH (7+) = full size, GOOD (5-6) = standard, MED (3-4) = reduced
- EXH signals are highest priority reversals
- ABS + DIV combination is strong reversal confirmation
- T2/T3 with trend are continuation signals
- Avoid counter-trend T1/T2 without EXH/ABS/DIV confirmation
Visual Guide
- Green circles below bar = Buy pressure (T1 small, T2 medium, T3 large)
- Red circles above bar = Sell pressure (T1 small, T2 medium, T3 large)
- Purple diamond + "ABS" = Absorption detected
- Cyan label + "EXH" = Exhaustion pattern
- Orange triangle + "DIV" = Delta divergence
- Yellow background = Counter-trend warning
Best Practices
- Trade during RTH (9:30am - 4:00pm ET) for most reliable signals
- Wait for HIGH or GOOD confidence before full position
- Use EXH as primary reversal trigger
- Check cumulative delta supports trade direction
- Combine with price action and support/resistance levels
Limitations
- Requires 1-second data availability (ES, NQ, MES, MNQ have this)
- ETH signals less reliable due to lower volume
- EMA-based trend lags on sharp reversals
- Not suitable for stocks without adjusting parameters significantly
- Absorption/Exhaustion patterns may not occur every session
Disclaimer
This indicator is for educational and informational purposes only. It does not constitute financial advice.
- Past performance does not guarantee future results
- The indicator shows where institutional activity is LIKELY - it does not predict the future
- Always conduct your own research and analysis
- Never risk more than you can afford to lose
- Paper trade any new strategy before using real capital
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.