INVITE-ONLY SCRIPT
Aggiornato

ZenAlgo - Bender

224
This script combines several volume-based methodologies into a single chart overlay to help traders analyze market participation and volume distribution. It aggregates volume from multiple sources—spot and perpetual markets across different exchanges—and processes it to display various insights directly on the chart.

The script provides a detailed view of both individual-bar volume and broader aggregated trends. It calculates certain values, plots different shapes and overlays, and includes an optional informational table. However, it does not offer financial signals or predict future price movements. Instead, it presents multiple volume and range-related highlights for educational or analytical observations.

Below is a detailed breakdown of the core elements in this script:

Core Data Calculation and Aggregation
To build a comprehensive volume picture, the script retrieves volume data from multiple predefined exchanges for both Spot and Perpetual pairs. The volume for each bar is processed in Aggregated mode, meaning it combines data across selected sources to produce a single composite volume value.

The script applies average-based aggregation to calculate the final volume figures. The total volume is then used as the basis for further calculations, such as buy/sell volume decomposition and Delta analysis.

Buy/Sell Volume Decomposition
Each bar’s total volume is separated into an estimated buy portion and a sell portion. This decomposition uses logic that considers wick length, body size, and whether the bar closed higher or lower than it opened. The script assigns fractions of the total volume to the upper wick, lower wick, and body, then multiplies these by the total aggregated volume to estimate buy and sell volumes.

This breakdown is calculated separately for spot-only volume, perp-only volume, and their aggregated sums, allowing traders to analyze how much of each bar’s volume is estimated as "buy" or "sell."

Delta and Cumulative Delta
The script computes a Delta (buy volume minus sell volume) for each bar. A positive Delta suggests more buying during that bar, while a negative Delta suggests more selling.

It also computes Cumulative Delta, summing this Delta over 14 bars (a fixed period). This allows users to observe how short-term buy/sell imbalances accumulate over time.

Visual Bar Coloring (PVSRA Logic)
The script includes logic based on PVSRA (Price Volume Support Resistance Analysis), which examines average volume over a recent lookback period to determine whether a bar meets certain "climax" or "above-average" thresholds.

Bars are categorized as:
  • Climax Up or Climax Down: If a bar meets strong volume and range conditions, it is identified as a high-activity bar.
  • Neutral Colors: Bars that do not meet the threshold are identified as standard volume bars.


Table Summaries
The script includes an optional Spot vs. Perpetual volume table that provides:
  • Aggregated Spot vs. Perpetual buy/sell volumes
  • The net difference between buying and selling
  • The total sum across all included sources
  • Percentage breakdown of buying vs. selling


A separate multi-timeframe table calculates volume-related metrics for fixed timeframes (15, 60, and 240 minutes), allowing traders to compare their current timeframe with broader trends.

Highlighted Shapes and Diamonds
The script places shape markers above or below bars when certain conditions are met, including:
  • Dots (circles): Representing a significant increase in net Delta compared to the previous bar.
  • Diamonds: Markers that appear when volume-based conditions align with predefined thresholds. These vary in size and include an optional "Hardcore Mode", which applies stricter filtering.
  • Crossover Triangles: These appear when the internally computed Delta MA (a moving average of Delta) crosses above or below a predefined EMA.


These markers highlight notable changes in volume, Delta, or price action but do not constitute predictive trading signals.

Delta Averages and Overlaid EMAs
The script plots a histogram of the current net Delta (buy minus sell). Additionally, a Delta Moving Average (Delta MA) is used for tracking trends. The Delta MA is plotted alongside predefined Exponential Moving Averages (EMAs), such as:
  • A Delta MA calculated using an exponential moving average (EMA) over 21 bars.
  • A set of predefined EMAs (lengths such as 3, 5, 7, 10, 13, 16, 21, 25, etc.) plotted to visualize momentum changes.
  • Areas between these EMAs can be filled with translucent shading to highlight momentum shifts.


Comparing the Delta MA to the overlaid EMAs helps track changes in Delta momentum over time.

Interpreting the Elements
When using this script, consider the following:
  • Volume Aggregation: The script aggregates volume across multiple Spot and Perpetual sources to provide a broad market view.
  • Delta and Cumulative Delta: The Delta histogram may spike positively or negatively, highlighting areas of potential buying or selling pressure.
  • Table Data: If enabled, the tables display buy/sell volume splits for Spot and Perpetual markets, along with multi-timeframe comparisons.
  • EMA Overlays on Delta: The stacked EMAs help visualize short-term vs. longer-term Delta changes.
  • Shape Markers: Dots, diamonds, and triangles emphasize notable shifts in volume or Delta but do not imply recommendations for action.


Usage Tips
  • Toggle "Hardcore Mode" to apply stricter filtering to highlight conditions.
  • Enable or disable the Spot vs. Perpetual Table to see if the breakdown of volume sources is useful.
  • Use the multi-timeframe table to compare intraday data with broader trends.
  • If the chart appears too cluttered, toggle off features like PVSRA color tints or some EMAs to focus on specific elements.


Final Thoughts
This script integrates multiple volume-based calculations, range analysis, aggregated volume from predefined tickers, and various moving averages for Delta. Its visual layers—color-coded bars, histograms, shape markers, and tables—offer a rich perspective on market activity.

Users can analyze these elements across any timeframe or market combination they prefer. The script does not provide buy/sell signals or make predictions—it is purely an analytical tool for understanding volume-based market dynamics.

Traders should interpret these visual elements according to their own strategy and trading approach.
Note di rilascio
This update introduces a new Scalping Mode, aimed at traders who focus on short-term moves. When enabled, the indicator panel displays two types of symbols: triangles and diamonds. These help you spot aggressive shifts in short-term volume dynamics and momentum.

Triangles (Scalping Crosses)
  • White triangle up: A short-term moving average (MA 21) has crossed above a longer-term average (MA 50), suggesting upward pressure.
  • Orange triangle down: MA 21 crossed below MA 50, hinting at downward pressure.

These markers only appear when scalping mode is enabled and the crossover happens in the current candle.

Diamonds (Strength & Direction Highlights)
  • White diamond: The short-term MA 50 has crossed above zero, indicating growing bullish strength in cumulative delta.
  • Orange diamond: The MA 50 has crossed below zero, pointing to growing bearish pressure.

These diamonds help users quickly gauge whether the short-term market pressure is shifting positively or negatively in terms of delta-based volume flow.

Other Changes
  • VWMA option has been added to the list of available moving averages for delta smoothing. This lets users choose a method that considers both volume and price more directly.
  • Cleaner display: The smallest dot markers from the previous version were removed to reduce clutter. Now only the more relevant medium and large dots remain, keeping the panel easier to read.
  • Additional options were added to fine-tune the new scalping behavior. These settings control how responsive the system is to short-term changes in price and volume.
Note di rilascio
1. New Triangle Symbols Based on Moving Average Trends
Two new types of triangle symbols have been introduced in **Scalping Mode** to better visualize short-term trends:
  • Bullish Triangle up: Appears at the bottom of the chart when MA 13 and MA 21 are both rising over the defined lookback period, MA 21 is above MA 50 and MA 50 is positive.
  • Bearish Triangle down: Appears at the top of the chart when MA 13 and MA 21 are both falling over the defined lookback period, MA 21 is below MA 50 and MA 50 is negative (below zero).

These triangles provide a clear way to identify when shorter-term momentum aligns consistently upward or downward based on recent moving average slopes.

User input added: Trend Lookback Period – allows users to control how many bars are considered for detecting rising/falling conditions on MA 13 and MA 21.

2. Alerts for the New Scalping Triangles
Two new alert conditions are now available:
  • “Bullish Scalping Signal” – triggers when the bullish triangle condition is met.
  • “Bearish Scalping Signal” – triggers when the bearish triangle condition is met.

These alerts match the visual triangle cues described above and can be used for notification or automation purposes.

3. Colored Square Symbol Reflecting MA 50 Bias
A new square symbol now appears near the bottom of the chart that:
  • Matches the current color of MA 50 (white if MA 50 is above zero, orange if below).
  • Acts as a persistent and compact visual cue for the current bias based on MA 50.

This symbol appears on every bar in Scalping Mode and provides a quick-glance status of the dominant directional pressure.

These additions are exclusively visual and are designed to give users more clarity and control over interpreting short-term volume-derived momentum within Scalping Mode.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.