All indicators

Cumulative Volume Delta (CVD)

Feb 26, 2024

Static chart image
Volume BasedSignalsDivergences

The Cumulative Volume Delta (CVD) indicator tracks the running total of net buying and selling pressure by calculating the difference between buy and sell volume using high-precision intrabar data.

Usage

The Cumulative Volume Delta (CVD) is primarily used to identify market trends and potential reversals by observing the exhaustion or aggression of buyers and sellers.

  • Trend Confirmation: When the CVD line is rising alongside price, it confirms a healthy bullish trend backed by aggressive buying. Conversely, a falling CVD line alongside a price drop confirms a bearish trend.
  • Divergence: If the price reaches a new high but the CVD fails to follow suit, it suggests that the buying pressure is weakening, signaling a potential reversal.
  • Confluence with Open Interest: Combining CVD with Open Interest (OI) can provide deeper insights. For example, if CVD is rising sharply from a flat market period while OI and volume are also increasing, it indicates a high probability of a sustained price "pump" or breakout.

Details

This script utilizes a streamlined calculation logic to determine volume delta. Volume delta is defined as the net difference between buy volume and sell volume within a specific timeframe. To ensure maximum accuracy, this indicator fetches data from lower timeframes (intrabars) rather than relying solely on the chart's current timeframe.

The intrabar selection is automated based on the chart interval:

  • Charts ≤ 1 minute use 1-second intrabars.
  • Charts ≤ 1 hour use 1-minute intrabars.
  • Charts ≤ 1 day use 60-minute intrabars.
  • Weekly charts use 240-minute intrabars.

The logic categorizes volume based on price movement relative to the open and previous close within these intrabars to estimate whether a trade was a "buy" or a "sell."

Settings

  • Style Settings: Users can adjust the color and line thickness of the CVD plot within the "Style" tab to match their chart theme.
  • Timeframe Constraint: The script is optimized for lower to medium timeframes. Using very high timeframes (greater than one week) may trigger a runtime error to preserve calculation integrity.

FAQ

How do I interpret a CVD crossover?

A crossover above zero indicates that the cumulative volume has turned net positive (more buying than selling over the tracked period), while a crossunder below zero indicates net negative volume.

Why does the indicator use intrabar data?

Standard timeframe volume does not distinguish between buying and selling pressure within a single candle. By looking at intrabars, the indicator can more accurately determine which side was more aggressive during the candle's formation.

How can I access this tool?

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.