OPEN-SOURCE SCRIPT
已更新 Volatility Contraction Score

Volatility Contraction Score (VCS)
Overview
Volatility Contraction Score (VCS) is a technical indicator inspired by Mark Minervini’s Volatility Contraction Pattern (VCP) concept. It is designed to quantify volatility compression and supply-demand equilibrium on a scale from 0 to 100.
This indicator does not detect VCP patterns directly. Instead, it measures the structural characteristics commonly observed in VCP bases, such as price range contraction and volume dry-up, and converts them into a numerical score.
A high score indicates that price volatility is compressed and energy is being stored within the structure. While this condition often precedes significant price expansion, it does not predict direction.
Score Components
VCS is calculated as a weighted composite of multiple factors:
1. Price Compression (ATR & Standard Deviation)
Short-term ATR and standard deviation are compared to their longer-term averages to measure how tightly price is trading.
2. Volume Contraction
Recent volume is compared to its historical average to detect signs of supply exhaustion.
3. Efficiency Filter
Strong directional trend phases are penalized. The purpose is to favor genuine compression phases rather than momentum expansion.
4. Higher Low Structure Check
The indicator verifies whether recent lows are holding above prior structural lows. If the structure deteriorates, the score is reduced rather than fully invalidated.
5. Consistency Bonus
The longer compression persists, the more additional points are awarded. This prioritizes bases that have formed over time instead of short-lived contractions.
Interpreting the Score
80 and above (Green)
Critical Tightness
Extremely compressed volatility. Energy accumulation is at elevated levels.
60 to 80 (Blue)
Setup Stage
Compression is developing. Suitable for watchlist candidates.
Below 60 (Gray)
Loose / Expansion Phase
Price remains volatile and lacks compression characteristics.
Important Note
VCS measures compression intensity.
It does not determine whether price will move up or down.
Usage & Interpretation
VCS visualizes the degree of energy compression.
The score itself does not indicate trade direction.
When the score rises above 80 and the histogram turns green, monitor price closely and observe which boundary of the consolidation range is broken.
1. Bullish Setup (Long Consideration)
Condition
The score remains above 80 while price forms a tight consolidation or small flag pattern.
Trigger
A decisive breakout above the upper boundary (resistance) of the range, ideally accompanied by expanding volume.
Interpretation
Stored energy is being released to the upside.
This suggests a potential continuation move aligned with the prior trend.
2. Avoidance / Short Setup (Downside Risk)
Condition
The score remains elevated while price begins to form lower lows or fails to hold key support levels.
Trigger
A breakdown below a major support level.
Interpretation
Supply-demand equilibrium has failed, and stored energy is being released to the downside.
This may represent a failed base or failed VCP-type structure and warrants caution.
Pine Screener Integration
This indicator outputs additional data fields for TradingView’s Pine screener.
VCS
Total compression score (0 to 100)
Example: Filter for values above 60 to identify tight candidates.
Relative Strength
Percentile rank of performance relative to a selected benchmark.
Example: Above 60 to focus on stocks outperforming the market.
ADR %
Average daily range percentage over the selected period.
Useful for risk filtering.
Avg Vol
Average trading volume.
Used as a liquidity filter.
Market Cap
Market capitalization, using reported data or estimated calculation.
Settings
VCP Logic Settings
Adjust short and long compression measurement periods.
Trend Filter
Control the strength of the directional trend penalty.
Structure Settings
Adjust penalty strength when higher low structure fails.
Consistency Weight
Set the maximum bonus for sustained compression.
Screener Data
Customize periods used for screener output metrics.
Design Philosophy
This indicator is built to:
• Quantify volatility compression
• Objectify the concept of tight price action
• Improve efficiency in identifying breakout candidates
VCS is not an entry signal.
It should be used in conjunction with structure analysis, trend context, and volume confirmation.
Overview
Volatility Contraction Score (VCS) is a technical indicator inspired by Mark Minervini’s Volatility Contraction Pattern (VCP) concept. It is designed to quantify volatility compression and supply-demand equilibrium on a scale from 0 to 100.
This indicator does not detect VCP patterns directly. Instead, it measures the structural characteristics commonly observed in VCP bases, such as price range contraction and volume dry-up, and converts them into a numerical score.
A high score indicates that price volatility is compressed and energy is being stored within the structure. While this condition often precedes significant price expansion, it does not predict direction.
Score Components
VCS is calculated as a weighted composite of multiple factors:
1. Price Compression (ATR & Standard Deviation)
Short-term ATR and standard deviation are compared to their longer-term averages to measure how tightly price is trading.
2. Volume Contraction
Recent volume is compared to its historical average to detect signs of supply exhaustion.
3. Efficiency Filter
Strong directional trend phases are penalized. The purpose is to favor genuine compression phases rather than momentum expansion.
4. Higher Low Structure Check
The indicator verifies whether recent lows are holding above prior structural lows. If the structure deteriorates, the score is reduced rather than fully invalidated.
5. Consistency Bonus
The longer compression persists, the more additional points are awarded. This prioritizes bases that have formed over time instead of short-lived contractions.
Interpreting the Score
80 and above (Green)
Critical Tightness
Extremely compressed volatility. Energy accumulation is at elevated levels.
60 to 80 (Blue)
Setup Stage
Compression is developing. Suitable for watchlist candidates.
Below 60 (Gray)
Loose / Expansion Phase
Price remains volatile and lacks compression characteristics.
Important Note
VCS measures compression intensity.
It does not determine whether price will move up or down.
Usage & Interpretation
VCS visualizes the degree of energy compression.
The score itself does not indicate trade direction.
When the score rises above 80 and the histogram turns green, monitor price closely and observe which boundary of the consolidation range is broken.
1. Bullish Setup (Long Consideration)
Condition
The score remains above 80 while price forms a tight consolidation or small flag pattern.
Trigger
A decisive breakout above the upper boundary (resistance) of the range, ideally accompanied by expanding volume.
Interpretation
Stored energy is being released to the upside.
This suggests a potential continuation move aligned with the prior trend.
2. Avoidance / Short Setup (Downside Risk)
Condition
The score remains elevated while price begins to form lower lows or fails to hold key support levels.
Trigger
A breakdown below a major support level.
Interpretation
Supply-demand equilibrium has failed, and stored energy is being released to the downside.
This may represent a failed base or failed VCP-type structure and warrants caution.
Pine Screener Integration
This indicator outputs additional data fields for TradingView’s Pine screener.
VCS
Total compression score (0 to 100)
Example: Filter for values above 60 to identify tight candidates.
Relative Strength
Percentile rank of performance relative to a selected benchmark.
Example: Above 60 to focus on stocks outperforming the market.
ADR %
Average daily range percentage over the selected period.
Useful for risk filtering.
Avg Vol
Average trading volume.
Used as a liquidity filter.
Market Cap
Market capitalization, using reported data or estimated calculation.
Settings
VCP Logic Settings
Adjust short and long compression measurement periods.
Trend Filter
Control the strength of the directional trend penalty.
Structure Settings
Adjust penalty strength when higher low structure fails.
Consistency Weight
Set the maximum bonus for sustained compression.
Screener Data
Customize periods used for screener output metrics.
Design Philosophy
This indicator is built to:
• Quantify volatility compression
• Objectify the concept of tight price action
• Improve efficiency in identifying breakout candidates
VCS is not an entry signal.
It should be used in conjunction with structure analysis, trend context, and volume confirmation.
版本注释
Fixed the issue where an error occurred when "Adjusted for Dividends" was enabled.开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。