OPEN-SOURCE SCRIPT
Aggiornato Delta Divergence Alarm [XWiseTrade]

Detect hidden buying/selling pressure with real-time delta divergence alerts.
This indicator aggregates lower timeframe volume to calculate delta and triggers alerts when:
• Price makes a lower low/higher high but delta shows opposite pressure (hidden divergence)
Features:
• Supports ultra-low timeframes (1s, 15s, 1-15min)
• Visual labels on divergence candles
• Built-in alerts
• Debug mode for data issues
Perfect for spotting absorption, exhaustion, and potential reversals.
This indicator aggregates lower timeframe volume to calculate delta and triggers alerts when:
• Price makes a lower low/higher high but delta shows opposite pressure (hidden divergence)
Features:
• Supports ultra-low timeframes (1s, 15s, 1-15min)
• Visual labels on divergence candles
• Built-in alerts
• Debug mode for data issues
Perfect for spotting absorption, exhaustion, and potential reversals.
Note di rilascio
Delta Divergence AlarmA candle tells you where price closed. It doesn't tell you who was actually in control underneath. This indicator compares the two — and flags the bars where they disagree.
Why it exists
Price can close red while real buying is quietly absorbing the selling, or close green while sellers are unloading into the strength. The candle shows one thing; the order flow underneath shows another. Those disagreements — where the surface and the real participation point in opposite directions — often precede the turns that catch candle-only traders off guard. This tool exists to surface that hidden pressure the candle hides.
How it works
On every bar, the indicator breaks the current candle down into lower-timeframe data (1-second up to 15-minute, your choice) to estimate delta — the difference between buying volume and selling volume within that bar. Each lower-timeframe piece is classified as buying (closed up), selling (closed down), or split evenly (unchanged), and the pieces are summed into a single net delta for the bar.
It then looks for a contradiction between the candle and that delta:
- Bullish Divergence — the candle closed down, but net delta is positive. The bar looks bearish, yet buyers were actually the stronger side underneath. Hidden buying.
- Bearish Divergence — the candle closed up, but net delta is negative. The bar looks bullish, yet sellers were actually in control underneath. Hidden selling.
When found, a label is placed on the bar showing the direction and the delta value, and an alert fires on bar close.
How to use it
Add it to any chart that has volume data. A green "Bullish Divergence" label under a red candle means selling pressure on the surface wasn't backed by real order flow — buyers were absorbing. A red "Bearish Divergence" label over a green candle means the opposite. Use these as a heads-up that the candle may be misleading and that the underlying flow disagrees with the visible move — not as a standalone entry. Lower-timeframe source is adjustable; finer sources give more precise delta but need more history. A debug mode is included to confirm whether lower-timeframe data is available on your symbol.
What makes it different
Most delta tools simply plot a delta histogram and leave you to read it. This one does the comparison for you and only speaks when the candle and the flow genuinely contradict each other — isolating the specific, actionable case of hidden pressure rather than streaming raw numbers. The lower-timeframe aggregation is what lets it estimate delta on instruments that don't expose native bid/ask data.
Inputs: lower-timeframe delta source, divergence colors, label offset, debug mode.
A note on data: on symbols without true traded volume (many forex/CFD feeds use tick counts), delta is an approximation based on lower-timeframe candle direction, and works best on instruments with real volume (stocks, futures, crypto).
These are descriptive order-flow signals for discretionary use, not buy/sell recommendations.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Free tools & education → xwisetrade.com | Community → discord.gg/BUVfRjey2u
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Free tools & education → xwisetrade.com | Community → discord.gg/BUVfRjey2u
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.