OPEN-SOURCE SCRIPT
CVD Candles + Divergence (Pane) [NIRALA]

This indicator provides a powerful way to analyze market dynamics by visualizing Cumulative Volume Delta (CVD) as candlesticks and automatically detecting divergences between price and order flow. It is designed to help traders spot potential trend exhaustion and reversals that may not be apparent from price action alone.
Key Concepts
Cumulative Volume Delta (CVD): CVD is a running total of the difference between buying and selling volume from market orders. A rising CVD indicates aggressive buying, while a falling CVD indicates aggressive selling. Unlike price, which can be influenced by passive limit orders, CVD shows the raw intent of aggressive market participants.
Divergence: A divergence occurs when price and CVD move in opposite directions. This signals a potential conflict between price action and the underlying order flow, often preceding a reversal.
Bearish Divergence: Price makes a new high, but CVD fails to make a new high (or makes a lower high). This suggests buying aggression is weakening despite the higher price, and a reversal to the downside may be imminent.
Bullish Divergence: Price makes a new low, but CVD fails to make a new low (or makes a higher low). This suggests selling pressure is drying up, and a reversal to the upside may be coming.
Features
CVD as Candlesticks: Plots CVD in a familiar OHLC candlestick format in a separate pane, providing a more intuitive view of order flow momentum and volatility compared to a simple line.
Automatic Divergence Detection: The script automatically identifies classic bullish and bearish divergences between price pivots and CVD pivots, drawing lines on both the main price chart and the indicator pane to clearly highlight them.
Multi-Timeframe Analysis: Calculates CVD from a user-defined lower timeframe, offering a more granular and precise view of the order flow that builds up a single candle on your chart.
Customizable Pivot Lookbacks: Allows you to adjust the sensitivity of the pivot detection for finding both short-term and long-term divergences.
Alerts: Includes built-in alerts that can notify you when a new bullish or bearish divergence is confirmed.
How to Use
Look for High-Probability Setups: This indicator is most powerful when its signals appear at key areas of support or resistance. A divergence at a major price level is a much stronger signal than one in the middle of a range.
Confirm with Price Action: Do not trade on a divergence signal alone. Wait for a confirmation candle (e.g., a bearish engulfing candle after a bearish divergence, or a bullish hammer after a bullish divergence) before considering an entry.
Combine with Your Strategy: Use this indicator as a confirmation tool to enhance your existing trading strategy. For example, if your primary strategy gives a sell signal and this indicator simultaneously prints a bearish divergence, it significantly increases the probability of the trade.
This tool is designed for discretionary traders looking to add a layer of order flow analysis to their decision-making process.
Key Concepts
Cumulative Volume Delta (CVD): CVD is a running total of the difference between buying and selling volume from market orders. A rising CVD indicates aggressive buying, while a falling CVD indicates aggressive selling. Unlike price, which can be influenced by passive limit orders, CVD shows the raw intent of aggressive market participants.
Divergence: A divergence occurs when price and CVD move in opposite directions. This signals a potential conflict between price action and the underlying order flow, often preceding a reversal.
Bearish Divergence: Price makes a new high, but CVD fails to make a new high (or makes a lower high). This suggests buying aggression is weakening despite the higher price, and a reversal to the downside may be imminent.
Bullish Divergence: Price makes a new low, but CVD fails to make a new low (or makes a higher low). This suggests selling pressure is drying up, and a reversal to the upside may be coming.
Features
CVD as Candlesticks: Plots CVD in a familiar OHLC candlestick format in a separate pane, providing a more intuitive view of order flow momentum and volatility compared to a simple line.
Automatic Divergence Detection: The script automatically identifies classic bullish and bearish divergences between price pivots and CVD pivots, drawing lines on both the main price chart and the indicator pane to clearly highlight them.
Multi-Timeframe Analysis: Calculates CVD from a user-defined lower timeframe, offering a more granular and precise view of the order flow that builds up a single candle on your chart.
Customizable Pivot Lookbacks: Allows you to adjust the sensitivity of the pivot detection for finding both short-term and long-term divergences.
Alerts: Includes built-in alerts that can notify you when a new bullish or bearish divergence is confirmed.
How to Use
Look for High-Probability Setups: This indicator is most powerful when its signals appear at key areas of support or resistance. A divergence at a major price level is a much stronger signal than one in the middle of a range.
Confirm with Price Action: Do not trade on a divergence signal alone. Wait for a confirmation candle (e.g., a bearish engulfing candle after a bearish divergence, or a bullish hammer after a bullish divergence) before considering an entry.
Combine with Your Strategy: Use this indicator as a confirmation tool to enhance your existing trading strategy. For example, if your primary strategy gives a sell signal and this indicator simultaneously prints a bearish divergence, it significantly increases the probability of the trade.
This tool is designed for discretionary traders looking to add a layer of order flow analysis to their decision-making process.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.