INVITE-ONLY SCRIPT
已更新 ZenAlgo - Delta

This indicator visualizes cumulative delta volume across multiple exchanges and trading pairs, with optional moving averages, divergence detection, and contextual labeling. It aggregates buy and sell volume from both spot and perpetual markets, applying normalization and visual encoding to highlight volume flow dynamics over time.
Volume Aggregation Logic
The script starts by collecting volume data from up to nine exchanges. It distinguishes between spot (e.g., USDT, USD) and perpetual markets (e.g., USDT.P, USD.P) using dynamically constructed tickers based on the asset's base currency. For each enabled exchange, it fetches volume using request.security, filtering out invalid or zero-volume responses.
Each set of volume data (spot1, spot2, perp1, perp2) is then processed through a reducer function that combines the values using a selected method—sum, average, median, or variance. These processed volumes are further categorized and summed into total spot and perp volume streams, forming the basis for downstream delta computations.
Delta Calculation
For each bar, the script decomposes the candlestick into wick and body proportions, calculating how much of the total volume might be attributed to upward or downward pressure. This estimation weights the volume by the visual structure of the candle—larger bodies and upper wicks in bullish candles suggest buying pressure; inverse logic applies for bearish candles.
These estimated buy and sell volumes are then subtracted to derive per-bar delta. A cumulative delta series is computed by summing this bar-by-bar delta across a user-defined window length.
Divergences on Delta
Fractal logic is applied to detect local highs and lows in the cumulative delta series. These points serve as anchors for divergence comparisons:
The same logic is applied independently to:
Each can be configured with different lookback lengths and moving average types (SMA, EMA, WMA, HMA, RMA).
The divergence logic gains additional value when used in tandem with the delta moving averages and contextual temperature state. For example, a divergence detected on the slower delta average while the temperature band is in an “Extreme Hot” or “Cold” zone may indicate a more meaningful exhaustion event. This layered approach allows users to filter weaker divergences and focus on those that align with broader delta context.
Gradient and Temperature Context
A third moving average (e.g., WMA(50)) is used to provide a contextual "temperature" state of the delta environment. Based on deviations from its own mean and standard deviation, this third MA is classified into zones:
These zones are encoded using color and transparency gradients in the chart’s background. This helps identify periods where delta conditions are statistically stretched or compressed relative to recent history.
EMA Cross Conditions
The script tracks crossover events between the short and long EMAs of delta, especially when these align with a directional shift in cumulative delta (e.g., zero-line cross). If confirmed by volume skew (more buy than sell or vice versa), specific visual markers are plotted.
Labels and Informational Lines
Dynamic labels are rendered on the latest bar showing:
These labels float next to the latest values, using thematic or neutral colors based on user preference.
Buy/Sell Pressure Tables
Two optional tables display breakdowns of:
These are calculated over the selected lookback period and color-coded accordingly.
An experimental table compares raw and aggregated spot/perpetual volume contributions and their percentage skew.
Background Highlight Logic
Background colors are conditionally rendered based on buy/sell volume dominance. Several thresholds exist:
Combined with temperature overlays, this highlights areas of potentially high conviction from either side.
Cross Conditions
The script detects situations where cumulative delta crosses under buy/sell volume thresholds. Visual dots mark:
This provides additional cues when short-term volume shifts might contradict recent cumulative flow.
How to Interpret Values
How to Best Use
Added Value Compared to Other Free Indicators
Limitations and Disclaimers
Additional Limitations
This indicator estimates delta from candle shape and volume distribution heuristics. In low-liquidity markets or on lower timeframes, this estimation may misrepresent actual flow dynamics, especially during volatile spikes or news-driven moves. Divergence patterns may appear with delay or persist without price reaction, particularly in ranging or algorithmically driven markets. Users should combine these tools with broader context and price action awareness rather than relying on isolated delta events.
Volume Aggregation Logic
The script starts by collecting volume data from up to nine exchanges. It distinguishes between spot (e.g., USDT, USD) and perpetual markets (e.g., USDT.P, USD.P) using dynamically constructed tickers based on the asset's base currency. For each enabled exchange, it fetches volume using request.security, filtering out invalid or zero-volume responses.
Each set of volume data (spot1, spot2, perp1, perp2) is then processed through a reducer function that combines the values using a selected method—sum, average, median, or variance. These processed volumes are further categorized and summed into total spot and perp volume streams, forming the basis for downstream delta computations.
Delta Calculation
For each bar, the script decomposes the candlestick into wick and body proportions, calculating how much of the total volume might be attributed to upward or downward pressure. This estimation weights the volume by the visual structure of the candle—larger bodies and upper wicks in bullish candles suggest buying pressure; inverse logic applies for bearish candles.
These estimated buy and sell volumes are then subtracted to derive per-bar delta. A cumulative delta series is computed by summing this bar-by-bar delta across a user-defined window length.
Divergences on Delta
Fractal logic is applied to detect local highs and lows in the cumulative delta series. These points serve as anchors for divergence comparisons:
- Regular divergences identify price making higher highs (or lower lows) while delta makes lower highs (or higher lows).
- Hidden divergences look for the opposite (price pullback vs delta continuation).
The same logic is applied independently to:
- Raw cumulative delta
- A primary delta moving average
- A secondary, slower moving average
Each can be configured with different lookback lengths and moving average types (SMA, EMA, WMA, HMA, RMA).
The divergence logic gains additional value when used in tandem with the delta moving averages and contextual temperature state. For example, a divergence detected on the slower delta average while the temperature band is in an “Extreme Hot” or “Cold” zone may indicate a more meaningful exhaustion event. This layered approach allows users to filter weaker divergences and focus on those that align with broader delta context.
Gradient and Temperature Context
A third moving average (e.g., WMA(50)) is used to provide a contextual "temperature" state of the delta environment. Based on deviations from its own mean and standard deviation, this third MA is classified into zones:
- "Extreme Hot", "Hot", "Warm"
- "Neutral"
- "Cool", "Cold", "Extreme Cold"
These zones are encoded using color and transparency gradients in the chart’s background. This helps identify periods where delta conditions are statistically stretched or compressed relative to recent history.
EMA Cross Conditions
The script tracks crossover events between the short and long EMAs of delta, especially when these align with a directional shift in cumulative delta (e.g., zero-line cross). If confirmed by volume skew (more buy than sell or vice versa), specific visual markers are plotted.
Labels and Informational Lines
Dynamic labels are rendered on the latest bar showing:
- Cumulative delta and last divergence
- EMA values and associated divergence
- "Slow MA" value and its temperature state
These labels float next to the latest values, using thematic or neutral colors based on user preference.
Buy/Sell Pressure Tables
Two optional tables display breakdowns of:
- Buy vs Sell volume
- Their percentage contribution
- Net delta value
- Market condition label (e.g., "Full Bull", "Bearish")
These are calculated over the selected lookback period and color-coded accordingly.
An experimental table compares raw and aggregated spot/perpetual volume contributions and their percentage skew.
Background Highlight Logic
Background colors are conditionally rendered based on buy/sell volume dominance. Several thresholds exist:
- 2x or 3x buy volume dominance → greenish tones
- 2x or 3x sell volume dominance → reddish tones
Combined with temperature overlays, this highlights areas of potentially high conviction from either side.
Cross Conditions
The script detects situations where cumulative delta crosses under buy/sell volume thresholds. Visual dots mark:
- Negative delta intersecting rising sell volume
- Positive delta intersecting rising buy volume
This provides additional cues when short-term volume shifts might contradict recent cumulative flow.
How to Interpret Values
- Cumulative Delta (AggDelta): Tracks net buy vs sell pressure over time. A rising delta suggests persistent buying pressure, and vice versa.
- Temperature State: Places delta flow into historical context. “Extreme Hot” implies sustained positive flow, possibly overextended; “Cold” signals inverse.
- EMA Lines: Short- and long-term smoothing of delta for trend and divergence detection.
- Cross Events: Represent moments when short EMA crosses over delta or long EMA, often signaling a directional momentum change.
- Tables and Labels: Quantify volume dominance and flow state, helping assess if flow aligns with price structure.
How to Best Use
- For context: Observe overall slope and temperature of the third MA. High deviations often precede cooling or reversal.
- For confluence: Look for alignment between price structure (e.g., higher highs) and delta divergence to identify exhaustion or continuation.
- For short-term timing: Watch EMA crosses and volume conditions (e.g., buy volume increasing while delta crosses above zero).
Added Value Compared to Other Free Indicators
- Multi-exchange Aggregation: Includes spot and perp data across major exchanges with flexible inclusion settings.
- Granular Delta Estimation: Uses candle body/wick proportions rather than simple up/down tick assumptions.
- Context-Aware Visualization: Integrates volume gradient, statistical deviation zones, and divergence overlays in one compact view.
- Highly Customizable: Users can fine-tune divergence, moving average, color scheme, and table display independently.
- Integrated View with Synergistic Logic: Unlike using several isolated scripts, this indicator unifies delta flow, divergence, volume dominance, and statistical context into one coherent framework. This synergy reduces the need to reconcile signals from different sources and allows for clearer judgment when multiple conditions align.
Limitations and Disclaimers
- Delta Approximation: Calculated using heuristic candle shape assumptions; not a tick-level order book delta.
- Exchange Coverage: Relies on availability of correct tickers and historical volume data via TradingView’s request.security.
- Visual Lag: Cumulative delta and divergence patterns may develop over several bars and are not predictive on their own.
- No Entry Signals: This indicator does not provide trading signals, nor does it evaluate risk or price targets.
Additional Limitations
This indicator estimates delta from candle shape and volume distribution heuristics. In low-liquidity markets or on lower timeframes, this estimation may misrepresent actual flow dynamics, especially during volatile spikes or news-driven moves. Divergence patterns may appear with delay or persist without price reaction, particularly in ranging or algorithmically driven markets. Users should combine these tools with broader context and price action awareness rather than relying on isolated delta events.
發行說明
Overbought/Oversold Table for WTA new visual WT overbought/oversold table has been added:
- A table displays the current value of the WT oscillator and its interpreted status (e.g., Extreme OB, Overbought, Heating, etc.).
- Current WT value (rounded to 2 decimal places)
- Each state is color-coded with a unique RGB shade to visually distinguish thermal zones.
- This provides a quick-glance assessment of the oscillator's condition using both numeric value and semantic zone labeling.
- Optionally shown or hidden in settings.
WT-Based Thermal Zone Logic
The addon introduces an interpretation layer on top of the WT oscillator.
Classifies the oscillator value into 7 descriptive categories:
- Extreme OB (≥70)
- Overbought (≥OBL)
- Heating (between midpoint and OBL)
- Neutral (equals midpoint)
- Chilling (between OSL and midpoint)
- Oversold (≤OSL)
- Extreme OS (≤ -70)
These categories are internally mapped to a color gradient, reinforcing the visual temperature metaphor.
This classification enhances context when comparing oscillator state against price or delta behavior.
發行說明
Added blow-off top and bottom alert conditions to help tracking the market.僅限邀請腳本
只有經作者批准的使用者才能訪問此腳本。您需要申請並獲得使用權限。該權限通常在付款後授予。如欲了解更多詳情,請依照以下作者的說明操作,或直接聯絡ZenAlgo_Official。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Get access here: https://zenalgo.io
提醒:在請求訪問權限之前,請閱讀僅限邀請腳本指南。
The ZenAlgo team
zenalgo.io
discord.zenalgo.io
zenalgo.io
discord.zenalgo.io
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
僅限邀請腳本
只有經作者批准的使用者才能訪問此腳本。您需要申請並獲得使用權限。該權限通常在付款後授予。如欲了解更多詳情,請依照以下作者的說明操作,或直接聯絡ZenAlgo_Official。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Get access here: https://zenalgo.io
提醒:在請求訪問權限之前,請閱讀僅限邀請腳本指南。
The ZenAlgo team
zenalgo.io
discord.zenalgo.io
zenalgo.io
discord.zenalgo.io
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。