OPEN-SOURCE SCRIPT

Volume Dispersion Field [JOAT]

891
Volume Dispersion Field

Introduction

The Volume Dispersion Field is an open-source non-overlay indicator that provides a comprehensive volume analysis suite combining relative volume classification, buy/sell delta tracking, volume dispersion measurement, climax detection, volume profile calculation, smart money activity analysis, and anomaly detection. Rather than showing a simple volume histogram, this indicator dissects volume into multiple analytical layers that reveal who is participating, how aggressively, and whether the activity is normal or anomalous.

Built with Pine Script v6, the indicator uses custom types for volume state, delta state, dispersion bins, profile data, smart money state, and volume pulse tracking.

snapshot

Why This Indicator Exists

Standard volume indicators show a single bar per candle. This tells you how much volume occurred but not who was buying or selling, whether the volume is unusual, or how volume is distributed across the price range. This indicator addresses those gaps by providing:

  • Seven-tier volume classification: Categorizes each bar from Extreme Low to Extreme High relative to the moving average, giving immediate context about whether current activity is normal or exceptional
  • Delta analysis: Estimates buying and selling volume using candle structure, then calculates smoothed delta and cumulative delta to show the net direction of volume pressure
  • Volume dispersion: Measures how volume is distributed between the upper and lower halves of the recent price range, revealing whether volume is concentrated at highs (distribution) or lows (accumulation)
  • Climax detection: Identifies volume spikes that exceed a configurable threshold, often marking exhaustion points or the start of major moves
  • Smart money analysis: Tracks institutional-sized volume activity and classifies the market phase as Accumulation, Markup, Distribution, or Markdown
  • Anomaly detection: Uses Z-score analysis to flag statistically unusual volume events that may indicate institutional intervention


Core Components Explained

1. Volume Classification System

Every bar is classified into one of seven categories based on its ratio to the volume moving average:

Pine Script®
volMA = ta.sma(volume, volMaLength) volRatio = volume / volMA


  • Extreme High (>= 3.0x): Institutional-level activity, potential climax
  • High (>= 2.0x): Significant above-average interest
  • Above Average (>= 1.0x): Healthy participation
  • Average (>= 0.5x): Normal market conditions
  • Below Average (>= 0.25x): Reduced interest
  • Low (< 0.25x): Thin liquidity, potential for slippage
  • Extreme Low: Minimal activity


Each category is color-coded with a distinct color from the Quantum Volume palette, making it instantly visible which bars carry institutional weight and which are retail noise. The high and low volume multiplier thresholds are fully configurable.

2. Delta Analysis

The delta engine estimates buying and selling volume by analyzing candle structure. For a bullish candle (close > open), buying volume is estimated as the proportion of the candle range from low to close, multiplied by total volume:

Pine Script®
if close > open buyVol := volume * (close - low) / (high - low + 0.0001) sellVol := volume - buyVol else if close < open sellVol := volume * (high - close) / (high - low + 0.0001) buyVol := volume - sellVol


The raw delta (buyVol - sellVol) is smoothed with an EMA and also accumulated over a configurable period to produce cumulative delta. Rising cumulative delta with rising price confirms bullish conviction. Falling cumulative delta with rising price warns of hidden distribution.

The indicator also detects delta divergences — when price moves in one direction but delta moves in the opposite direction over a 10-bar window. These divergences are marked with cross symbols on the chart.

The Volume Dispersion Field panel showing color-coded volume bars, delta histogram, cumulative delta line, and smart money accumulation/distribution arrows with the dashboard displaying all metrics

3. Volume Dispersion Measurement

Dispersion quantifies how volume is distributed between the upper and lower halves of the recent price range. Over the dispersion lookback period (default 50 bars), the indicator sums volume for bars that closed in the upper half versus the lower half:

  • Positive dispersion (> 20): Volume is concentrated in the upper range — bullish bias, potential distribution if extended
  • Negative dispersion (< -20): Volume is concentrated in the lower range — bearish bias, potential accumulation if extended
  • Near zero: Volume is balanced across the range — no clear directional bias


Dispersion is plotted as a filled area chart, providing a visual representation of where the volume weight sits within the price range.

4. Volume Profile and POC

The indicator calculates a simplified volume profile by dividing the recent price range into configurable bins (default 10) and summing volume in each bin. From this profile, it derives:

  • Point of Control (POC): The price level with the highest volume — acts as a magnet for price
  • Value Area High (VAH): Upper boundary of the 70% volume concentration zone
  • Value Area Low (VAL): Lower boundary of the 70% volume concentration zone


The profile type is classified as Normal (balanced), Imbalanced (narrow value area, directional), or Ranged (wide value area, consolidation).

5. Smart Money and Anomaly Detection

The smart money engine analyzes volume distribution across the price range over a 50-bar window. If significantly more volume occurs in the lower 30% of the range while price is below its 50-period SMA, the indicator classifies the phase as Accumulation. If more volume occurs in the upper 30% while price is above the SMA, it classifies as Distribution.

Anomaly detection uses Z-score analysis:

Pine Script®
volState.zScore := (volume - volMA) / (volStdDev + 0.0001) volState.isAnomaly := math.abs(volState.zScore) > anomalyThreshold


Volume events with Z-scores exceeding the threshold (default 3.0 standard deviations) are flagged as anomalies and marked with diamond symbols. These statistically rare events often indicate institutional intervention or major news-driven activity.

6. Market Phase Classification

The indicator classifies the current market phase based on the combination of price direction and volume trend:

  • Markup: Price rising + volume rising — healthy uptrend
  • Distribution: Price rising + volume falling — potential top forming
  • Accumulation: Price falling + volume rising — smart money buying the dip
  • Markdown: Price falling + volume falling — healthy downtrend


Visual Elements

  • Volume Histogram: Color-coded bars by classification tier
  • Volume MA Line: 20-period moving average of volume
  • High/Low Volume Bands: Reference bands at the high and low multiplier levels with fill
  • Delta Histogram: Smoothed buy/sell delta with gradient coloring
  • Cumulative Delta Line: Running sum of delta over configurable period
  • Dispersion Area: Filled area showing volume distribution bias
  • Climax Markers: Triangle markers for buy and sell climax events
  • Anomaly Markers: Diamond markers for statistically unusual volume
  • Smart Money Arrows: Accumulation (up arrow) and Distribution (down arrow) signals
  • Volume Pulse: Circle markers when volume exceeds the pulse threshold
  • Heatmap Background: Subtle background coloring based on volume intensity
  • Dashboard: 14-row metrics table showing volume category, anomaly status, phase, delta direction, dispersion, and more


Close-up of the dashboard showing volume classification as "HIGH", phase as "Markup", delta as "BULLISH" with "BUY SIDE" flow, and an anomaly detection reading

Input Parameters

Volume Analysis:
  • Volume MA Length (default 20)
  • High Volume Multiplier (default 2.0) and Low Volume Multiplier (default 0.5)


Delta Analysis:
  • Delta Smoothing (default 3)
  • Cumulative Delta Length (default 20)


Dispersion Settings:
  • Dispersion Lookback (default 50) and Dispersion Bins (default 10)


Climax Detection:
  • Climax Threshold (default 2.5) and Climax Lookback (default 50)


Advanced Volume:
  • Smart Money Concepts, Institutional Activity, Volume Anomalies toggles
  • Anomaly Threshold (default 3.0 std dev)
  • Volume Pulse toggle and Pulse Threshold (default 1.5)


Visual Settings:
  • Volume Profile, Dashboard, Glow Effects, Heatmap toggles
  • Profile Width and Color Scheme (Quantum, Classic, Professional, Neon)


snapshot

How to Use This Indicator

Step 1: Monitor the volume classification. Extreme High and High bars deserve attention — they indicate institutional participation. Consecutive high-volume bars in one direction confirm conviction.

Step 2: Check the delta direction. Bullish delta with rising price confirms the move. Bearish delta with rising price (divergence) warns of potential reversal.

Step 3: Watch for climax events. A buy climax (extreme volume + bullish candle) at a resistance level may signal exhaustion. A sell climax at support may signal capitulation.

Step 4: Monitor the market phase. Accumulation phases often precede significant upward moves. Distribution phases often precede declines.

Step 5: Pay attention to anomaly markers. These statistically rare volume events often mark turning points or the start of major institutional campaigns.

Step 6: Use dispersion to understand volume positioning. Positive dispersion (volume at highs) during an uptrend is healthy. Positive dispersion during a downtrend suggests distribution.

Indicator Limitations

  • Delta estimation uses candle structure as a proxy for actual order flow. It is an approximation, not true Level 2 data.
  • Volume analysis works best on instruments with reliable, consistent volume data. Forex spot volume from brokers is tick volume, not true exchange volume.
  • Anomaly detection assumes volume follows a roughly normal distribution. During earnings seasons or major events, multiple "anomalies" may fire in succession.
  • The volume profile is a simplified calculation using close prices, not a tick-by-tick profile. It provides a useful approximation but not exchange-grade precision.
  • Smart money phase classification is based on volume distribution patterns, not on actual institutional order data.
  • Climax detection identifies extreme volume events but does not predict the direction of the subsequent move.


Originality Statement

This indicator is original in its comprehensive, multi-layer approach to volume analysis. While individual volume tools exist, this indicator is justified because:

  • It combines seven distinct volume analysis methodologies (classification, delta, dispersion, profile, climax, smart money, anomaly) into a unified system
  • Z-score-based anomaly detection provides a statistical framework for identifying unusual volume that simple threshold methods miss
  • Market phase classification (Accumulation/Markup/Distribution/Markdown) adds a Wyckoff-inspired context layer to raw volume data
  • Volume dispersion measurement quantifies the spatial distribution of volume across the price range, a metric not available in standard volume indicators
  • The delta divergence detection system identifies hidden disagreements between price and volume pressure
  • The comprehensive dashboard presents 14 metrics simultaneously for holistic volume analysis


Disclaimer

This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Volume analysis is a tool for understanding market participation, not a crystal ball for predicting future price movement. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.

-Made with passion by officialjackofalltrades

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.