OPEN-SOURCE SCRIPT
CVD Z-Score [SolQuant]

The CVD Z-Score [SolQuant] indicator measures cumulative buying versus selling pressure, normalized as a statistical z-score, to detect volume-price divergences and accumulation/distribution phases. It displays a smoothed oscillator that highlights when volume delta reaches statistical extremes, identifies effort-versus-result efficiency, and flags potential spot accumulation setups where rising CVD coincides with flat price action and declining open interest.
█ USAGE
Reading the Z-Score Oscillator
The main line oscillates around zero. Positive values indicate net buying pressure is above its recent average; negative values indicate net selling pressure. The line is colored blue when bullish and pink when bearish. The further the line moves from zero, the more statistically significant the current volume delta is relative to its recent history. A gradient fill extends from the zero line to the oscillator, making momentum direction and strength immediately visible.
The neutral zone between +1.0 and -1.0 represents normal statistical variation. Values beyond ±1.0 indicate increasingly meaningful directional pressure. Values beyond ±2.0 are statistically extreme.
Climax Zone Warnings
When the Z-Score first crosses above +2.0 or below -2.0, a diamond marker appears on the oscillator. These climax entries indicate that buying or selling pressure has reached a statistical extreme — a condition that often precedes exhaustion or reversal. While the Z-Score remains in the extreme zone, a subtle background highlight persists as a visual reminder that conditions are overextended.
Diamonds mark only the first bar entering the extreme zone, not every bar within it. This keeps the chart clean while still flagging the transition into climax territory.
Spot Accumulation Signals
Blue circle markers appear at the bottom of the oscillator when three conditions align simultaneously:
1 — The CVD Z-Score is positive and rising (buying pressure increasing)
2 — Price action is flat (range is contained within 1.5x ATR)
3 — Open Interest is declining (futures positions are unwinding)
This combination suggests that buying is occurring in the spot market while futures traders are reducing exposure — a pattern often associated with accumulation phases before a move higher.
Dashboard
An optional dashboard displays three real-time metrics:
• Z-Score: Current value with trend arrow and extreme zone highlighting. Green background at extreme overbought, red at extreme oversold.
• Efficiency: Shows whether the current market is in a "Breakout" state (price responding to volume), "Churn" state (volume active but price stalling), or "Balanced."
• Phase: Displays the current signal state — "Accumulation" when spot accumulation conditions are met, "Climax" when the Z-Score is in an extreme zone, or "Neutral."
█ DETAILS
CVD Calculation
Cumulative Volume Delta is built bar-by-bar. Bullish bars (close > open) add their full volume to the running total. Bearish bars (close < open) subtract their full volume. Doji bars (close = open) contribute zero. The resulting cumulative line tracks the net balance of buying versus selling pressure over time.
Z-Score Normalization
The raw CVD value is normalized into a z-score by subtracting its Simple Moving Average and dividing by its Standard Deviation, both calculated over the configurable lookback period (default: 20). This transforms the CVD into a standardized measure of how far current buying/selling pressure deviates from its recent norm. An EMA of the configurable smoothing length (default: 5) is applied to reduce noise while preserving responsiveness.
Efficiency Analysis (Effort vs Result)
The efficiency metric compares price movement to CVD movement over the last 5 bars. The ratio is calculated as the absolute price change divided by the absolute CVD change, scaled for readability. High efficiency (above 5) indicates a "Breakout" — price is moving significantly relative to volume delta, suggesting genuine directional commitment. Low efficiency (below 0.5) indicates "Churn" — volume delta is active but price is not responding, which may signal absorption, distribution, or range-bound conditions.
Open Interest Integration
Open Interest data is fetched from a configurable ticker (default: BINANCE:BTCUSDT.P_OI). The change in OI is used exclusively for spot accumulation signal detection. Declining OI combined with rising CVD and flat price suggests that buying pressure is coming from the spot market rather than leveraged futures positions.
█ SETTINGS
Z-Score Settings
• Z-Score Lookback Period: SMA and Standard Deviation period for z-score normalization (default: 20). Higher values produce a smoother baseline but slower response to regime changes.
• Smoothing Length (EMA): EMA period applied to the raw z-score (default: 5). Higher values reduce noise; lower values increase sensitivity.
Data Source
• OI Ticker: Symbol for Open Interest data used in spot accumulation detection (default: BINANCE:BTCUSDT.P_OI). Change this to match the asset being analyzed.
Signals
• Show Spot Accumulation Signals: Toggle blue circle markers when CVD is rising with flat price and declining OI.
• Show Climax Zone Warnings: Toggle diamond markers and background highlights at extreme z-score levels (±2.0).
Dashboard
• Show Dashboard: Toggle the multi-metric information panel.
• Dashboard Position: Place the dashboard at any of seven screen positions.
• Dashboard Size: Choose between Tiny, Small, or Medium text sizes.
This indicator measures statistical extremes in volume delta and does not predict price direction. Accumulation signals identify a specific volume-price-OI pattern that does not guarantee a subsequent move. Climax events indicate statistical extremes that may not result in reversals. It does not constitute financial advice. Past performance does not guarantee future results.
█ USAGE
Reading the Z-Score Oscillator
The main line oscillates around zero. Positive values indicate net buying pressure is above its recent average; negative values indicate net selling pressure. The line is colored blue when bullish and pink when bearish. The further the line moves from zero, the more statistically significant the current volume delta is relative to its recent history. A gradient fill extends from the zero line to the oscillator, making momentum direction and strength immediately visible.
The neutral zone between +1.0 and -1.0 represents normal statistical variation. Values beyond ±1.0 indicate increasingly meaningful directional pressure. Values beyond ±2.0 are statistically extreme.
Climax Zone Warnings
When the Z-Score first crosses above +2.0 or below -2.0, a diamond marker appears on the oscillator. These climax entries indicate that buying or selling pressure has reached a statistical extreme — a condition that often precedes exhaustion or reversal. While the Z-Score remains in the extreme zone, a subtle background highlight persists as a visual reminder that conditions are overextended.
Diamonds mark only the first bar entering the extreme zone, not every bar within it. This keeps the chart clean while still flagging the transition into climax territory.
Spot Accumulation Signals
Blue circle markers appear at the bottom of the oscillator when three conditions align simultaneously:
1 — The CVD Z-Score is positive and rising (buying pressure increasing)
2 — Price action is flat (range is contained within 1.5x ATR)
3 — Open Interest is declining (futures positions are unwinding)
This combination suggests that buying is occurring in the spot market while futures traders are reducing exposure — a pattern often associated with accumulation phases before a move higher.
Dashboard
An optional dashboard displays three real-time metrics:
• Z-Score: Current value with trend arrow and extreme zone highlighting. Green background at extreme overbought, red at extreme oversold.
• Efficiency: Shows whether the current market is in a "Breakout" state (price responding to volume), "Churn" state (volume active but price stalling), or "Balanced."
• Phase: Displays the current signal state — "Accumulation" when spot accumulation conditions are met, "Climax" when the Z-Score is in an extreme zone, or "Neutral."
█ DETAILS
CVD Calculation
Cumulative Volume Delta is built bar-by-bar. Bullish bars (close > open) add their full volume to the running total. Bearish bars (close < open) subtract their full volume. Doji bars (close = open) contribute zero. The resulting cumulative line tracks the net balance of buying versus selling pressure over time.
Z-Score Normalization
The raw CVD value is normalized into a z-score by subtracting its Simple Moving Average and dividing by its Standard Deviation, both calculated over the configurable lookback period (default: 20). This transforms the CVD into a standardized measure of how far current buying/selling pressure deviates from its recent norm. An EMA of the configurable smoothing length (default: 5) is applied to reduce noise while preserving responsiveness.
Efficiency Analysis (Effort vs Result)
The efficiency metric compares price movement to CVD movement over the last 5 bars. The ratio is calculated as the absolute price change divided by the absolute CVD change, scaled for readability. High efficiency (above 5) indicates a "Breakout" — price is moving significantly relative to volume delta, suggesting genuine directional commitment. Low efficiency (below 0.5) indicates "Churn" — volume delta is active but price is not responding, which may signal absorption, distribution, or range-bound conditions.
Open Interest Integration
Open Interest data is fetched from a configurable ticker (default: BINANCE:BTCUSDT.P_OI). The change in OI is used exclusively for spot accumulation signal detection. Declining OI combined with rising CVD and flat price suggests that buying pressure is coming from the spot market rather than leveraged futures positions.
█ SETTINGS
Z-Score Settings
• Z-Score Lookback Period: SMA and Standard Deviation period for z-score normalization (default: 20). Higher values produce a smoother baseline but slower response to regime changes.
• Smoothing Length (EMA): EMA period applied to the raw z-score (default: 5). Higher values reduce noise; lower values increase sensitivity.
Data Source
• OI Ticker: Symbol for Open Interest data used in spot accumulation detection (default: BINANCE:BTCUSDT.P_OI). Change this to match the asset being analyzed.
Signals
• Show Spot Accumulation Signals: Toggle blue circle markers when CVD is rising with flat price and declining OI.
• Show Climax Zone Warnings: Toggle diamond markers and background highlights at extreme z-score levels (±2.0).
Dashboard
• Show Dashboard: Toggle the multi-metric information panel.
• Dashboard Position: Place the dashboard at any of seven screen positions.
• Dashboard Size: Choose between Tiny, Small, or Medium text sizes.
This indicator measures statistical extremes in volume delta and does not predict price direction. Accumulation signals identify a specific volume-price-OI pattern that does not guarantee a subsequent move. Climax events indicate statistical extremes that may not result in reversals. It does not constitute financial advice. Past performance does not guarantee future results.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。