PROTECTED SOURCE SCRIPT
Institutional Buying Detector

Institutional Buying Detector
What It Does
Identifies genuine institutional buying patterns through multi-criteria analysis of price action and volume. Detects sustained accumulation periods that often precede significant price movements.
Key Features
How It Works
The indicator uses a comprehensive detection system:
Visual Output
Configuration Options
Volume Analysis Algorithm
Pine Script®
Market Compatibility
Performance & Compliance
Important Notes
What It Does
Identifies genuine institutional buying patterns through multi-criteria analysis of price action and volume. Detects sustained accumulation periods that often precede significant price movements.
Key Features
- 6-filter validation system prevents false signals
- Non-overlapping pattern detection ensures unique signals
- Advanced volume analysis comparing institutional vs pre-period activity
- Configurable detection parameters (35% gain, 60% green ratio defaults)
- Professional visual design with clean lines and readable labels
- Works across all timeframes with daily being most common
How It Works
The indicator uses a comprehensive detection system:
- Cumulative Gain: 35%+ price increase over 3-19 day periods
- Green Candle Ratio: 60%+ green days for sustained buying pressure
- Red Candle Limits: Max 4% drop per red candle, max 2 consecutive reds
- First Candle Filter: 2%+ gain required for pattern initiation
- Volume Validation: Green candles > pre-leg average, red candles < green average
- Non-Overlapping Logic: Each candle belongs to only one institutional period
Visual Output
- Gray diagonal lines connecting pattern start to end points
- Multi-line labels showing gain%, green ratio, and duration
- Configurable label positioning (Above, Below, Center, Left, Right)
- Optional compact format for cleaner charts
Configuration Options
- Detection Parameters: Min gain (20-60%), green ratio (50-90%), red limits (2-10%)
- Lookback Periods: Analysis range from 2-30 days
- Volume Analysis: Enable/disable sophisticated volume filtering
- Visual Settings: Line colors, text colors, label positions
- Price Selection: Open/Low for start, High/Close for end prices
Volume Analysis Algorithm
// Pre-leg baseline calculation
preLegPeriod = lookbackDays before pattern start
avgPreLegVolume = SMA(volume, preLegPeriod)
// Validation logic
FOR each green candle: volume must exceed pre-leg average
FOR each red candle: volume must be below green candle average
Market Compatibility
- All equity markets with reliable volume data
- Daily timeframe recommended
- Optimized for Indian stocks (NSE/BSE)
- Works on stocks, ETFs with sufficient liquidity
Performance & Compliance
- Pine Script v6 with latest optimizations
- Memory efficient with 500 line/label limit handling
- Bar replay compatible with no duplicate elements
- Educational license with proper risk disclaimers
Important Notes
This indicator is for educational purposes only. Provides pattern analysis, not trading advice. Users should conduct their own research and implement proper risk management.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.