OPEN-SOURCE SCRIPT
CVD Pressure Ledger - Cumulative Volume Delta Flow

CVD Pressure Ledger - Cumulative Volume Delta Flow
CVD Pressure Ledger is a neutral volume-pressure research tool for studying how cumulative volume delta evolves, resets, normalizes, and interacts with price response.
It is designed for traders who want to observe the slope of supply/demand pressure, volume imbalance, price-flow agreement, and effort-versus-response context without turning those observations into automated trade signals.
This script is a context and visualization tool, not a trading system. It does not generate buy/sell signals. It does not provide entries, exits, targets, stops, position sizing, forecasts, win-rate claims, or performance claims.
What It Visualizes
The script displays a reset-aware cumulative volume delta framework with several optional visual layers:
- CVD line
- CVD candles
- Bar delta histogram
- Rescaled pressure score line
- Zero line and reset anchor tint
- Neutral pressure background
- Compact ledger table
- Data-quality notes for limited volume, fallback mode, live bars, and non-standard charts
The goal is to make volume-pressure context readable without overloading the chart.
Delta Engine
The script offers multiple calculation modes:
1. Auto intrabar
The script first attempts to use an intrabar CVD calculation when a valid lower timeframe is available. If it cannot use intrabar data safely, it falls back to a bar-based approximation.
2. Intrabar CVD
Uses TradingView's official TradingView/ta library requestVolumeDelta() function to request lower-timeframe volume delta information and build intrabar-aware CVD candles when the selected lower timeframe is valid.
3. Tick-rule approximation
Estimates positive or negative delta from the candle direction. This is a bar-based approximation and is not real bid/ask order flow.
4. CLV range-weighted approximation
Estimates delta from where the close sits within the candle range using a Close Location Value style calculation. This is also an approximation and is not real bid/ask order flow.
Auto lower timeframe mode avoids seconds/tick requests by default for stability. Manual lower timeframe mode remains available for users who want to research smaller timeframes when their data plan, feed, and symbol support them.
What Makes It Different
Many CVD tools focus mainly on a cumulative line, CVD candles, or a delta histogram.
CVD Pressure Ledger adds several context layers around the core CVD calculation:
- Reset-aware CVD state
- Pressure score normalized to a -100 to +100 scale
- CVD z-score and percentile context
- Delta share normalization
- Pressure persistence age
- New positive/negative CVD extremes within the reset period
- Price-flow agreement and mismatch context
- Effort-versus-response classification
- A compact ledger fingerprint that summarizes pressure, z-score bucket, response bucket, state age, and mismatch context
This makes the script more of a volume-pressure ledger than a simple cumulative delta plot.
Pressure Score
The pressure score is a normalized composite value from -100 to +100. It combines several configurable components:
- CVD slope
- Delta share
- CVD z-score
- Pressure persistence
Each component has a user-adjustable weight. The score is not a signal. It is a research value intended to summarize the current pressure context.
Pressure states are classified as Positive, Negative, or Neutral using a configurable threshold, neutral band, and optional hysteresis. Hysteresis helps reduce rapid state flipping around the threshold.
Price-Flow Agreement
The price-flow agreement layer compares price slope and CVD slope over a configurable lookback.
It classifies the context into neutral descriptive states such as:
- Price up / flow up
- Price down / flow down
- Price up / flow soft
- Price down / flow firm
- Mixed / flat
The script can also detect when price-flow mismatch starts or expands. These are contextual observations only, not trade signals.
Effort vs Response
The effort-versus-response layer compares volume-delta effort with normalized price movement.
It can classify contexts such as:
- High effort / muted response
- Flow and price aligned
- Price response leads flow
- Low activity
- Mixed response
This layer is intended to help users study whether large delta activity is accompanied by a proportional price response. It does not imply absorption, reversal, continuation, or a future outcome by itself.
Ledger Fingerprint
The ledger fingerprint is a compact text summary shown in the table.
Example format:
P0 Z1 Rm A5 M0
Meaning:
- P+, P-, P0: pressure polarity
- Z0, Z1, Z2: CVD z-score bucket
- Rh, Rm, Rl: response bucket
- A: pressure state age
- M0, Mx, Mn: mismatch context
This helps users quickly compare the current volume-pressure context across symbols, timeframes, and reset settings.
Inputs and Customization
The script includes grouped inputs for:
- Delta engine
- Reset / anchor mode
- Normalization
- Pressure score
- Price-flow agreement
- Effort vs response
- Display mode
- Colors
- Ledger table
- Alerts
- Safety / data warnings
Users can adjust calculation mode, lower timeframe, reset method, session settings, smoothing, lookbacks, thresholds, weights, display mode, table position, table size, colors, and alert availability.
Display Modes
The script includes several display presets:
- Clean: CVD line, zero line, and compact table
- Candle: CVD candles and delta histogram
- Research: CVD, pressure score, histogram, and table context
- Minimal: CVD line with minimal warnings
The visual design is intentionally restrained so the output remains readable on both dark and light chart themes.
Alerts
The script includes factual alert conditions, such as:
- Pressure state changed
- Positive pressure state started
- Negative pressure state started
- Pressure returned to neutral
- New positive CVD extreme
- New negative CVD extreme
- Price-flow mismatch started
- Price-flow mismatch expanded
- High effort / muted response context
- Reset period started
- Data fallback active
Alerts are descriptive context events only. They are not entry, exit, buy, sell, target, or stop signals.
Limitations
Delta calculations are approximations unless the selected data source and TradingView functions provide suitable lower-timeframe information.
Lower-timeframe and intrabar calculations depend on available historical data, symbol, exchange, feed, and account/data-plan limits.
FX, CFD, index, and synthetic symbols may use tick volume, broker-specific volume, or limited volume data. This can affect all volume-based calculations.
If a chart has no usable volume data, CVD may appear as a flat line because there is no volume input to accumulate. In that case, the table will show a volume limitation note. This is expected behavior, not a directional reading.
Non-standard chart types such as Heikin Ashi, Renko, Kagi, Point & Figure, Range, and other synthetic charts can affect price, volume, and derived calculations.
Realtime values can update until the bar closes. When Confirmed bars only is enabled, events and alerts are gated to confirmed bars, but visual values may still update on the live bar.
The default settings are research starting points, not optimized parameters.
What This Script Does Not Do
This script does not:
- Generate buy or sell signals
- Recommend trades
- Forecast price
- Provide entries or exits
- Provide targets or stops
- Provide position sizing
- Claim accuracy, profitability, or statistical reliability
- Reconstruct true bid/ask order flow
- Replace exchange-native order book or footprint data
Suggested Chart Setup
For publication screenshots and general use, a clean chart is recommended:
- Use one liquid symbol with visible volume
- Show the full symbol and timeframe
- Use only this script on the chart unless another script is necessary and explained
- Use Research mode when demonstrating the full context layers
- Use Clean mode when showing the CVD line and ledger table more simply
Japanese Notes / 日本語補足
CVD Pressure Ledger は、累積デルタを単純に表示するだけではなく、出来高デルタの偏り、累積状態、リセット、正規化、価格反応との噛み合いを整理して表示する研究用インジケーターです。
このスクリプトは売買シグナルではありません。エントリー、エグジット、利確、損切り、ポジションサイズ、将来予測、勝率、利益性を示すものではありません。
主な確認項目は次の通りです。
- CVDの累積方向
- Bar deltaの偏り
- Pressure score
- CVD z-score
- Price-flow agreement
- Effort vs response
- Pressure state age
- Ledger fingerprint
Tick-rule と CLV range-weighted は近似計算です。実際のbid/ask約定方向を完全に復元するものではありません。
FX、CFD、指数、合成銘柄では、出来高がティックボリューム、ブローカー依存の出来高、または制限された出来高である場合があります。そのため、出来高ベースの計算は銘柄やデータフィードによって解釈に注意が必要です。
出来高が取得できないチャートでは、累積する出来高入力がないため、CVDが横棒のように表示されることがあります。これはインジケーターの故障ではなく、利用可能な出来高データがないことによる自然な挙動です。
平均足、練行足、カギ足、ポイント&フィギュア、レンジ足などの非標準足では、価格や出来高の扱いが通常足と異なるため、計算結果の解釈に注意してください。
リアルタイムの未確定足では値が更新される可能性があります。Confirmed bars only を有効にしている場合、イベントとアラートは確定足基準になりますが、表示値はライブバー中に更新されることがあります。
初期設定は研究開始用の値であり、特定の銘柄、時間足、市場に最適化されたものではありません。
CVD Pressure Ledger is a neutral volume-pressure research tool for studying how cumulative volume delta evolves, resets, normalizes, and interacts with price response.
It is designed for traders who want to observe the slope of supply/demand pressure, volume imbalance, price-flow agreement, and effort-versus-response context without turning those observations into automated trade signals.
This script is a context and visualization tool, not a trading system. It does not generate buy/sell signals. It does not provide entries, exits, targets, stops, position sizing, forecasts, win-rate claims, or performance claims.
What It Visualizes
The script displays a reset-aware cumulative volume delta framework with several optional visual layers:
- CVD line
- CVD candles
- Bar delta histogram
- Rescaled pressure score line
- Zero line and reset anchor tint
- Neutral pressure background
- Compact ledger table
- Data-quality notes for limited volume, fallback mode, live bars, and non-standard charts
The goal is to make volume-pressure context readable without overloading the chart.
Delta Engine
The script offers multiple calculation modes:
1. Auto intrabar
The script first attempts to use an intrabar CVD calculation when a valid lower timeframe is available. If it cannot use intrabar data safely, it falls back to a bar-based approximation.
2. Intrabar CVD
Uses TradingView's official TradingView/ta library requestVolumeDelta() function to request lower-timeframe volume delta information and build intrabar-aware CVD candles when the selected lower timeframe is valid.
3. Tick-rule approximation
Estimates positive or negative delta from the candle direction. This is a bar-based approximation and is not real bid/ask order flow.
4. CLV range-weighted approximation
Estimates delta from where the close sits within the candle range using a Close Location Value style calculation. This is also an approximation and is not real bid/ask order flow.
Auto lower timeframe mode avoids seconds/tick requests by default for stability. Manual lower timeframe mode remains available for users who want to research smaller timeframes when their data plan, feed, and symbol support them.
What Makes It Different
Many CVD tools focus mainly on a cumulative line, CVD candles, or a delta histogram.
CVD Pressure Ledger adds several context layers around the core CVD calculation:
- Reset-aware CVD state
- Pressure score normalized to a -100 to +100 scale
- CVD z-score and percentile context
- Delta share normalization
- Pressure persistence age
- New positive/negative CVD extremes within the reset period
- Price-flow agreement and mismatch context
- Effort-versus-response classification
- A compact ledger fingerprint that summarizes pressure, z-score bucket, response bucket, state age, and mismatch context
This makes the script more of a volume-pressure ledger than a simple cumulative delta plot.
Pressure Score
The pressure score is a normalized composite value from -100 to +100. It combines several configurable components:
- CVD slope
- Delta share
- CVD z-score
- Pressure persistence
Each component has a user-adjustable weight. The score is not a signal. It is a research value intended to summarize the current pressure context.
Pressure states are classified as Positive, Negative, or Neutral using a configurable threshold, neutral band, and optional hysteresis. Hysteresis helps reduce rapid state flipping around the threshold.
Price-Flow Agreement
The price-flow agreement layer compares price slope and CVD slope over a configurable lookback.
It classifies the context into neutral descriptive states such as:
- Price up / flow up
- Price down / flow down
- Price up / flow soft
- Price down / flow firm
- Mixed / flat
The script can also detect when price-flow mismatch starts or expands. These are contextual observations only, not trade signals.
Effort vs Response
The effort-versus-response layer compares volume-delta effort with normalized price movement.
It can classify contexts such as:
- High effort / muted response
- Flow and price aligned
- Price response leads flow
- Low activity
- Mixed response
This layer is intended to help users study whether large delta activity is accompanied by a proportional price response. It does not imply absorption, reversal, continuation, or a future outcome by itself.
Ledger Fingerprint
The ledger fingerprint is a compact text summary shown in the table.
Example format:
P0 Z1 Rm A5 M0
Meaning:
- P+, P-, P0: pressure polarity
- Z0, Z1, Z2: CVD z-score bucket
- Rh, Rm, Rl: response bucket
- A: pressure state age
- M0, Mx, Mn: mismatch context
This helps users quickly compare the current volume-pressure context across symbols, timeframes, and reset settings.
Inputs and Customization
The script includes grouped inputs for:
- Delta engine
- Reset / anchor mode
- Normalization
- Pressure score
- Price-flow agreement
- Effort vs response
- Display mode
- Colors
- Ledger table
- Alerts
- Safety / data warnings
Users can adjust calculation mode, lower timeframe, reset method, session settings, smoothing, lookbacks, thresholds, weights, display mode, table position, table size, colors, and alert availability.
Display Modes
The script includes several display presets:
- Clean: CVD line, zero line, and compact table
- Candle: CVD candles and delta histogram
- Research: CVD, pressure score, histogram, and table context
- Minimal: CVD line with minimal warnings
The visual design is intentionally restrained so the output remains readable on both dark and light chart themes.
Alerts
The script includes factual alert conditions, such as:
- Pressure state changed
- Positive pressure state started
- Negative pressure state started
- Pressure returned to neutral
- New positive CVD extreme
- New negative CVD extreme
- Price-flow mismatch started
- Price-flow mismatch expanded
- High effort / muted response context
- Reset period started
- Data fallback active
Alerts are descriptive context events only. They are not entry, exit, buy, sell, target, or stop signals.
Limitations
Delta calculations are approximations unless the selected data source and TradingView functions provide suitable lower-timeframe information.
Lower-timeframe and intrabar calculations depend on available historical data, symbol, exchange, feed, and account/data-plan limits.
FX, CFD, index, and synthetic symbols may use tick volume, broker-specific volume, or limited volume data. This can affect all volume-based calculations.
If a chart has no usable volume data, CVD may appear as a flat line because there is no volume input to accumulate. In that case, the table will show a volume limitation note. This is expected behavior, not a directional reading.
Non-standard chart types such as Heikin Ashi, Renko, Kagi, Point & Figure, Range, and other synthetic charts can affect price, volume, and derived calculations.
Realtime values can update until the bar closes. When Confirmed bars only is enabled, events and alerts are gated to confirmed bars, but visual values may still update on the live bar.
The default settings are research starting points, not optimized parameters.
What This Script Does Not Do
This script does not:
- Generate buy or sell signals
- Recommend trades
- Forecast price
- Provide entries or exits
- Provide targets or stops
- Provide position sizing
- Claim accuracy, profitability, or statistical reliability
- Reconstruct true bid/ask order flow
- Replace exchange-native order book or footprint data
Suggested Chart Setup
For publication screenshots and general use, a clean chart is recommended:
- Use one liquid symbol with visible volume
- Show the full symbol and timeframe
- Use only this script on the chart unless another script is necessary and explained
- Use Research mode when demonstrating the full context layers
- Use Clean mode when showing the CVD line and ledger table more simply
Japanese Notes / 日本語補足
CVD Pressure Ledger は、累積デルタを単純に表示するだけではなく、出来高デルタの偏り、累積状態、リセット、正規化、価格反応との噛み合いを整理して表示する研究用インジケーターです。
このスクリプトは売買シグナルではありません。エントリー、エグジット、利確、損切り、ポジションサイズ、将来予測、勝率、利益性を示すものではありません。
主な確認項目は次の通りです。
- CVDの累積方向
- Bar deltaの偏り
- Pressure score
- CVD z-score
- Price-flow agreement
- Effort vs response
- Pressure state age
- Ledger fingerprint
Tick-rule と CLV range-weighted は近似計算です。実際のbid/ask約定方向を完全に復元するものではありません。
FX、CFD、指数、合成銘柄では、出来高がティックボリューム、ブローカー依存の出来高、または制限された出来高である場合があります。そのため、出来高ベースの計算は銘柄やデータフィードによって解釈に注意が必要です。
出来高が取得できないチャートでは、累積する出来高入力がないため、CVDが横棒のように表示されることがあります。これはインジケーターの故障ではなく、利用可能な出来高データがないことによる自然な挙動です。
平均足、練行足、カギ足、ポイント&フィギュア、レンジ足などの非標準足では、価格や出来高の扱いが通常足と異なるため、計算結果の解釈に注意してください。
リアルタイムの未確定足では値が更新される可能性があります。Confirmed bars only を有効にしている場合、イベントとアラートは確定足基準になりますが、表示値はライブバー中に更新されることがあります。
初期設定は研究開始用の値であり、特定の銘柄、時間足、市場に最適化されたものではありません。
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.