ZenAlgo - Avenger

Volume Delta Calculation
This indicator computes delta as the difference between estimated buy and sell volumes using volume data from multiple centralized exchanges. It distinguishes between spot and perpetual volumes, combining them into total volume.
To estimate buying and selling volume from raw volume data, candle structure is broken down into body and wicks. The body is interpreted as the core directional movement (buy/sell), while the wicks are treated as uncertain or counteraction. This segmentation helps infer the likely share of buying and selling within each bar.
The delta is calculated per bar and then aggregated over a lookback period (default 14 bars) to generate a cumulative delta. This approach provides a smoothed value of volume pressure trends over time.
A moving average is applied to the delta values (using selectable MA types like EMA or SMA) to define signal crossovers and suppress noise.
Delta Visualization
To contextualize delta within price action, the delta is scaled dynamically (by ATR or user-defined value) and plotted as a band around the closing price. Positive delta expands upward from price, negative delta downward. This provides a visual overlay that reflects net market pressure in context with price movement.
In cases of extreme delta (threshold set at 80% of recent maximum), the indicator marks spike bars using symbols to indicate significant directional pressure.
Identification of Noteworthy Conditions
The indicator highlights points on the chart where specific conditions are met based on the interaction between volume delta and its moving average. These conditions may align with moments of market pressure imbalance and directional movement, but they are not to be interpreted as trade signals in isolation.
Instead, these chart markers serve as visual flags for potential interest. They are intended to draw the user’s attention to scenarios where:
- The delta crosses above or below its moving average, suggesting a potential shift in volume pressure.
- The cumulative delta supports the direction of this crossover.
Optional filters can further restrict these markings to periods where:
- The short-term trend (as inferred from EMA slope) supports the direction.
- Volume is elevated relative to a recent average.
A user-defined cooldown period prevents multiple markings within short succession to avoid clutter.
It is essential to underscore that these markers do not constitute buy or sell advice. Their role is diagnostic, helping the trader to identify potential moments of interest which should be analyzed in conjunction with broader context, such as trend structure, price action, support/resistance levels, or external market data.
EMA Structure
Six EMAs with fixed lengths (13 to 56) are plotted and colored dynamically based on the most recent crossover between the fastest and slowest (EMA1 and EMA6). These EMAs help visualize short- to mid-term trends. The crossover itself is marked with symbols, with vertical offset based on ATR to maintain chart readability.
Average Line (AVG)
The indicator also calculates an average price based on a fixed window (100 bars). This is not a standard moving average but rather a raw average of recent prices stored in a circular buffer. The average is plotted, and its relative distance to the current price is labeled as a percentage. This feature serves as a simplified representation of fair value or mean reversion anchor.
EMA6 vs AVG Cross
Another layer of point of interest detection involves EMA6 crossing the AVG line. This crossover is only considered valid if EMA6 shows slope consistency in the crossing direction. These events are marked using symbols and offset vertically to avoid overlapping price action.
Divergence Detection
The script detects both regular and hidden divergences between price and delta:
- Regular divergences are defined when price makes a higher high or lower low, while delta fails to confirm (makes a lower high or higher low).
- Hidden divergences occur when price retraces (lower high or higher low), but delta moves against this retracement, indicating underlying strength or weakness.
Divergence points are labeled with "R" (regular) or "H" (hidden) and appear at local pivot highs or lows. The number of visible divergence labels can be limited for chart clarity.
POC and nPOC Calculations
The script includes a simplified volume profile implementation, calculating:
- POC (Point of Control): the price level with the highest volume for the given period.
- nPOC (non-tested POC): historical POCs that have not yet been revisited by price.
Price levels are bucketed into rows (user-defined), and volume per bucket is tracked to identify the POC. Upon a new period (e.g., day, week), a horizontal POC line is drawn. Once tested by price, the line’s appearance changes (color fades, label shrinks), helping users distinguish between untouched and touched levels.
Limits are enforced on the number of retained POCs and their maximum distance from current bars to optimize performance and chart readability.
Exchange Aggregation
Volume data is aggregated across major exchanges. This ensures that the delta calculation captures a broader market picture beyond a single venue, reducing exchange-specific noise.
How to Interpret Values
- Delta Band: Wide bands indicate strong directional imbalance. Narrow bands suggest indecision or low volume.
- EMA Crossover Symbols: Appear on directional shifts in moving averages. Multiple EMAs reinforcing the same slope typically indicate stronger trend.
- AVG Line: Represents average price over recent history. Large deviations can indicate overextension or potential mean reversion.
- Divergences: Regular ones may point to weakening momentum; hidden ones can suggest continuation despite corrective price action.
- POC / nPOC: Key volume-based support/resistance levels. Untested nPOCs can act as magnets for price retests.
How to Best Use This Indicator
- Use in conjunction with trend context (e.g., higher timeframe EMAs) to avoid counter-trend indications.
- Treat delta spikes as caution zones—especially if they occur at known support/resistance.
- Watch for divergences as early warning signs before price reverses.
- Use POC/nPOC as target levels, especially if aligned with delta signals.
- Apply volume and trend filters to reduce noise on shorter timeframes.
Added Value
- Multi-exchange volume aggregation makes the delta calculation more robust.
- Real-time cumulative delta overlaid directly on the price chart provides immediate context.
- Points of interest on chart are conservative and filterable, intended to reduce false positives.
- The combination of delta, trend-following EMAs, fair value line, and volume profile data is rarely found in one overlay script.
- POC/nPOC visualization based on real traded volume helps identify high-interest zones for future price interaction.
Why Is It Worth Paying For
While free alternatives may provide partial insights (e.g., basic delta or single EMA crossovers), this indicator integrates multiple domains—delta, divergence, average price, trend overlays, and profile levels—into a coherent, optimized chart tool. The value lies not just in having these tools, but in how they are synchronized and visualized.
Furthermore, sourcing and synchronizing volume data from multiple exchanges for delta estimation is not straightforward in Pine Script and adds to the indicator's complexity and utility.
Disclaimers and Limitations
- Delta estimation is based on candle structure and assumes wick/body distribution reflects buyer/seller activity, which may not always be precise.
- Multi-exchange volume data relies on availability via TradingView’s request.security() function; if exchange data is missing or delayed, results may be incomplete.
- Divergences do not guarantee reversals—should be used as part of a broader analysis framework.
- On illiquid instruments or exotic pairs, the value of delta and volume-based analytics may be reduced due to unreliable volume.
Skrip jemputan sahaja
Hanya pengguna yang diberikan kebenaran oleh penulis mempunyai akses kepada skrip ini dan ini selalunya memerlukan pembayaran. Anda boleh menambahkan skrip kepada kegemaran anda tetapi anda hanya boleh menggunakannya selepas meminta kebenaran dan mendapatkannya daripada penulis — ketarhui lebih lanjut di sini. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi ZenAlgo_Official secara terus.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.
Penafian
Skrip jemputan sahaja
Hanya pengguna yang diberikan kebenaran oleh penulis mempunyai akses kepada skrip ini dan ini selalunya memerlukan pembayaran. Anda boleh menambahkan skrip kepada kegemaran anda tetapi anda hanya boleh menggunakannya selepas meminta kebenaran dan mendapatkannya daripada penulis — ketarhui lebih lanjut di sini. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi ZenAlgo_Official secara terus.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.