OPEN-SOURCE SCRIPT

Z-Score Volume with CVD Trend

57
Z-Score Volume & CVD Trend with Exhaustion Signals
This powerful, all-in-one indicator combines statistical volume analysis, Cumulative Volume Delta (CVD), and a custom clustering algorithm to provide a clear and dynamic view of market sentiment. It is designed to help traders identify the prevailing trend and spot potential reversals or trend exhaustion before they happen.

Important Note: This indicator is specifically designed and optimized for use during the Regular Trading Hours (RTH) New York session, which is typically characterized by high volume and volatility. Its signals may be less reliable in low-volume or overnight sessions.

Core Concepts
1. Volume Z-Score
The script first calculates a Z-score for volume, which measures how many standard deviations a bar's volume is from a moving average. This helps to identify statistically significant volume spikes that may signal institutional activity or a major shift in sentiment.

2. Cumulative Volume Delta (CVD)
CVD plots the net difference between buying and selling volume over time. A rising CVD indicates a surplus of buying pressure, while a falling CVD shows a surplus of selling pressure. This provides a clear look at the direction of momentum.

3. Custom Clustering
By combining the Volume Z-score and CVD delta, the script classifies each bar into one of six distinct "clusters." The purpose is to simplify complex data into actionable signals.

High Conviction Bullish: High Z-score volume with strong CVD buying.

High Conviction Bearish: High Z-score volume with strong CVD selling.

Effort vs. Result: High Z-score volume with no clear CVD bias, indicating indecision or a struggle between buyers and sellers.

Quiet Accumulation: Low volume with subtle CVD buying, suggesting passive accumulation.

Quiet Distribution: Low volume with subtle CVD selling, suggesting passive distribution.

Low Conviction/Noise: Low volume and low CVD, representing general market noise.

Trend and Exhaustion Logic
Trend Establishment: The indicator determines the overall trend (Bullish, Bearish, or Neutral) by analyzing the majority of recent clusters over a configurable lookback period.

A Bullish Trend is confirmed when a majority of recent bars are either "High Conviction Bullish" or "Quiet Accumulation."

A Bearish Trend is confirmed when a majority of recent bars are either "High Conviction Bearish" or "Quiet Distribution."

Trend Exhaustion: This is a key feature for identifying potential reversals. The script looks for a divergence between price action and CVD within a confirmed trend.

Bullish Exhaustion Signal: Occurs during a confirmed "Bullish Trend" when you see a bearish divergence (price makes a higher high, but CVD shows negative delta and a close lower than the open). This is a strong sign the uptrend may be running out of steam.

Bearish Exhaustion Signal: Occurs during a confirmed "Bearish Trend" when you see a bullish divergence (price makes a lower low, but CVD shows positive delta and a close higher than the open). This indicates the downtrend may be exhausted.

How to Interpret the Visuals
Volume Bars: Colored to match the cluster they belong to.

Background Color: Shows the overall trend (light green for bullish, light red for bearish).

Circle Markers (bottom): Green circles indicate a bullish trend, and red circles indicate a bearish trend.

Triangles and Circles (top): Represent the specific cluster of each bar.

Trend Exhaustion Markers: Triangles above/below the bar signal potential trend exhaustion.

Info Table: An optional table provides a real-time summary of all key metrics for the current bar.

Settings
Volume EMA Length: Adjusts the moving average used for the Volume Z-score calculation.

Z-Score Look Back: Defines the number of bars to use for the volume and CVD percentile calculation.

Lower/Upper Cluster Percentile: Use these to adjust the sensitivity of the clustering. Tighter ranges (e.g., 25/75) capture more data, while wider ranges (e.g., 10/90) will only signal truly extreme events.

Trend Lookback Bars: Controls how many recent bars are considered when determining the trend.

This script offers a comprehensive and easy-to-read way to integrate volume, momentum, and trend analysis into your trading.

Happy Trading!

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.