OPEN-SOURCE SCRIPT
Primitive Delta Divergence

Primitive Delta Divergence
This indicator detects volume-price divergences by analyzing the relationship between price direction and volume bias over a rolling lookback period, revealing potential momentum shifts before they become apparent in price action alone.
Instead of relying solely on price movements, you can identify moments when volume sentiment contradicts price direction — a core concept borrowed from footprint chart analysis, adapted for traditional bar charts.
For example, when price moves higher but volume is predominantly bearish, or when price declines while volume shows bullish accumulation.
🔹 How it works
Lookback Period (n) → defines the rolling window for analyzing price and volume relationships
Creates a "meta-candle" from the lookback period, comparing its open vs. close for price bias
Volume classification → separates each bar's volume into bullish (green candles), bearish (red candles), or neutral (doji candles)
Volume bias calculation → generates a continuous score (-1 to +1) representing the directional volume pressure
Plots divergence signals when price direction and volume bias disagree
🔹 Use cases
Spot early momentum exhaustion when price and volume move in opposite directions
Identify potential reversal zones where volume suggests underlying weakness or strength
Enhance entry/exit timing by incorporating volume-based confirmation alongside price action
Apply footprint-style analysis to any timeframe without specialized charting tools
✨ Primitive Delta Divergence reveals the hidden story volume tells about price, uncovering divergences that traditional indicators might miss.
This indicator detects volume-price divergences by analyzing the relationship between price direction and volume bias over a rolling lookback period, revealing potential momentum shifts before they become apparent in price action alone.
Instead of relying solely on price movements, you can identify moments when volume sentiment contradicts price direction — a core concept borrowed from footprint chart analysis, adapted for traditional bar charts.
For example, when price moves higher but volume is predominantly bearish, or when price declines while volume shows bullish accumulation.
🔹 How it works
Lookback Period (n) → defines the rolling window for analyzing price and volume relationships
Creates a "meta-candle" from the lookback period, comparing its open vs. close for price bias
Volume classification → separates each bar's volume into bullish (green candles), bearish (red candles), or neutral (doji candles)
Volume bias calculation → generates a continuous score (-1 to +1) representing the directional volume pressure
Plots divergence signals when price direction and volume bias disagree
🔹 Use cases
Spot early momentum exhaustion when price and volume move in opposite directions
Identify potential reversal zones where volume suggests underlying weakness or strength
Enhance entry/exit timing by incorporating volume-based confirmation alongside price action
Apply footprint-style analysis to any timeframe without specialized charting tools
✨ Primitive Delta Divergence reveals the hidden story volume tells about price, uncovering divergences that traditional indicators might miss.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.