OPEN-SOURCE SCRIPT
Bull/Bear FVG Density Ratio

This indicator tracks the directional frequency of Fair Value Gaps (FVGs) over a configurable lookback window, offering a clean, responsive measure of market imbalance.
🔍 What It Does:
Detects bullish and bearish FVGs using a 3-bar displacement logic
Calculates the ratio of FVGs to candles over the last N bars
Plots separate density curves for bullish and bearish FVGs
Includes a threshold line to help identify regime shifts (e.g., drought vs spate)
📈 How to Use:
Use rising density to confirm trend strength or breakout momentum
Watch for crossovers above the threshold to signal active imbalance regimes
Combine with price action or volume overlays for high-confluence setups
⚙️ Inputs:
Lookback Window: Number of candles used to calculate FVG density
Threshold: Visual guide for regime classification (default: 0.2)
This tool is ideal for traders who want to move beyond symptomatic signals and model structural causality. It pairs well with lifecycle scoring, retest velocity, and HTF overlays.
🔍 What It Does:
Detects bullish and bearish FVGs using a 3-bar displacement logic
Calculates the ratio of FVGs to candles over the last N bars
Plots separate density curves for bullish and bearish FVGs
Includes a threshold line to help identify regime shifts (e.g., drought vs spate)
📈 How to Use:
Use rising density to confirm trend strength or breakout momentum
Watch for crossovers above the threshold to signal active imbalance regimes
Combine with price action or volume overlays for high-confluence setups
⚙️ Inputs:
Lookback Window: Number of candles used to calculate FVG density
Threshold: Visual guide for regime classification (default: 0.2)
This tool is ideal for traders who want to move beyond symptomatic signals and model structural causality. It pairs well with lifecycle scoring, retest velocity, and HTF overlays.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının yaratıcısı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının yaratıcısı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.