OPEN-SOURCE SCRIPT
تم تحديثه 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.
ملاحظات الأخبار
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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Free tools & education → xwisetrade.com | Community → discord.gg/BUVfRjey2u
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Free tools & education → xwisetrade.com | Community → discord.gg/BUVfRjey2u
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.