CVD Divergence Detector
Dec 26, 2025

The CVD Divergence Detector tool identifies discrepancies between price action and Cumulative Volume Delta (CVD) to highlight potential market reversals based on order flow.
Usage
The script detects two primary types of divergences to signal potential trend shifts:
- Bearish Divergence: Occurs when price reaches a higher high while the CVD fails to do so, suggesting a lack of buying pressure to support the upward move.
- Bullish Divergence: Occurs when price reaches a lower low while the CVD fails to do so, suggesting that selling pressure is exhausting.
The tool provides two distinct detection modes:
- Confirmed Divergences: These are high-accuracy signals based on fully confirmed pivot points. They appear as solid red or green lines with "Bear" or "Bull" labels.
- Early Warning Mode: These signals fire significantly earlier than confirmed ones by using shorter lookback periods. They are displayed as dashed lines with "Early" warning labels, useful for scalpers or early entries.
Users can apply various strategies such as scaling into positions when an early warning appears and adding to the position upon a confirmed signal, or strictly trading confirmed signals for higher-probability swing setups.
Details
Unlike traditional divergence indicators that rely on lagged oscillators like RSI or MACD, this script utilizes real-time Cumulative Volume Delta. By analyzing the volume delta across different timeframes, the indicator reveals the underlying buying and selling pressure that may not be immediately visible through price action alone. The script includes logic to filter out noise, such as minimum bar spacing between signals and a minimum CVD strength percentage requirement to ensure only significant divergences are highlighted.
Settings
Delta Source
- Anchor Timeframe: The higher timeframe used for CVD aggregation (e.g., 1D for day trading).
- Custom Lower TF: Allows the use of a specific lower timeframe for more granular delta calculation.
Pivot Logic
- Pivot Left/Right: The number of bars required to the left and right to confirm a pivot point.
- Delta Tolerance: A small threshold to account for minor fluctuations in delta values.
- Enable Early Warning: Toggles the visibility of fast, unconfirmed signals.
- Early Warning Right Bars: Sets the confirmation window for early signals.
- Min Bars Between Divergences: A filter to prevent signal clustering and spam.
- Min CVD Difference %: Filters out weak divergences by requiring a minimum percentage difference in delta values.
Visual
- Show Divergence Lines/Labels: Toggles the visibility of chart elements.
- Colors: Customizable colors for bullish, bearish, and early warning signals.
- Label Size: Adjusts the size of the text labels on the chart.
FAQ
How can I access the CVD Divergence Detector? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why are there no signals appearing on my chart? Ensure that your current symbol provides volume data, as CVD requires volume to function. Additionally, try lowering the "Min CVD Difference %" or the "Pivot Right" settings if the current market conditions are low-volatility.
What timeframe is best for this indicator? While it works on all timeframes, the 15-minute chart is often recommended for day trading to balance signal frequency and accuracy. For scalping, lower timeframes with "Early Warning" enabled are preferred.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.