All indicators

Cumulative Volume Delta Line

Jun 1, 2024

Static chart image
Volume BasedDivergencesMoving Averages

The Cumulative Volume Delta Line indicator tracks net buying and selling pressure by aggregating volume delta over time and provides an adaptive visualization that switches between raw CVD and moving averages across different timeframes. This tool is specifically designed to help traders identify volume divergences and exhaustion points with greater precision than standard volume histograms.

Usage

The indicator can be used to identify market sentiment and potential trend reversals through volume analysis:

  • Divergence Spotting: By using a line chart format rather than bars, it is easier to identify when price reaches a new high while the CVD line makes a lower high (bearish divergence), or vice versa.
  • Adaptive Timeframe Analysis: On lower timeframes, the script displays the raw Cumulative Volume Delta line for intraday trend tracking. On higher timeframes (such as Daily), it can automatically switch to a Moving Average to smooth out data and highlight long-term pressure shifts.
  • Extreme Volume Detection: The script highlights "Extreme Candles" when the volume delta significantly exceeds the recent average, signaling potential exhaustion or high-conviction moves.
  • Failed Pressure Backgrounds: The indicator highlights bars where price direction contradicts high volume delta (e.g., high buying delta but a bearish candle), indicating that one side of the market is trapped or "failing."

Details

Unlike many community scripts that use approximate calculations, this indicator utilizes lower timeframe data requests to ensure high accuracy. It calculates the difference between buying and selling volume (Volume Delta) and then aggregates this value starting from a specified anchor period (Cumulative Volume Delta).

To resolve the common issue where daily CVD looks like per-bar delta, this script employs an "Auto-Switching" logic. This ensures that the visual output remains useful for divergence analysis regardless of whether you are looking at a 1-minute or a Daily chart.

Settings

Data Collection

  • Anchor period: Sets the timeframe for when the CVD resets. Leaving this empty uses the chart timeframe for smooth per-bar calculations.
  • Use custom timeframe: Enables manual selection of the lower timeframe used for volume calculations.
  • Lower TF for 5m and below: Allows the use of 1-second or tick data for higher precision on fast timeframes.

Moving Average

  • MA Length: The lookback period for the moving average calculation.
  • MA Type: Choose from various types including SMA, EMA, HMA, LSMA, and more.
  • Use MA from timeframe: Defines the threshold at which the script switches from raw CVD to a moving average (e.g., 1D and above).

Color & Display

  • Color Mode: Select how the line is colored (by bar delta, slope, threshold, or fixed).
  • Show Failed Pressure Background: Toggles the background highlights for volume/price contradictions.
  • Threshold %: The percentage above the average delta required to trigger threshold coloring.
  • Extreme Threshold %: The percentage above average required to highlight price candles as "Extreme."

FAQ

How do I use this for divergences?

Look for instances where price makes a higher high, but the Cumulative Volume Delta line makes a lower high. This suggests that despite the price increase, the net buying pressure is weakening.

What is the advantage of the SMA switch on Daily charts?

Standard CVD often resets or becomes jagged on Daily timeframes. Switching to an SMA allows for a smoother representation of net volume trends over days or weeks, making long-term divergences much more visible.

How can I access Cumulative Volume Delta Line?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.