OPEN-SOURCE SCRIPT
Actualizado

Cumulative Volume Delta Line

18 542
This script is a refined version of TradingView's Cumulative Volume Delta (CVD) indicator. It features a CVD line for lower time frames and automatically switches to a Simple Moving Average (SMA) line on daily time frames and higher. This functionality makes it easier to spot Volume Delta divergences on daily charts while maintaining utility on intraday time frames.

Key Features:
Line Chart and Oscillator Configuration: Unlike TradingView's standard CVD, this script can be configured as a line chart or an oscillator, enhancing flexibility and usability.

Line chart for easier divergence spotting: The line chart format is preferred for spotting divergences, providing a clearer visual representation compared to other formats.

Accurate Calculations: Many older community CVD scripts use approximate calculations that can be inaccurate. This script leverages TradingView's own calculations, which are the most accurate available without tick data feeds.

Intraday and Daily Adaptation: The Traditional CVD script is a per bar volume delta on Daily and higher timeframes and cumulative volume delta for intraday session timeframes which makes it very hard to spot divergences on higher timeframes. This script resolves that by using an SMA on daily time frames and higher.

Auto-Switching Feature: The script intelligently switches between the CVD line and the SMA line based on the active time frame. This feature can be toggled off if you prefer to use the CVD on all time frames or the SMA on all time frames.

Customizable Settings: Building on TradingView's CVD script, this version includes all the same settings in addition to the new auto-switch, SMA length etc.

About Volume Delta and Cumulative Volume Delta:
Volume Delta is the difference between the buying and selling volume within a specified period. It helps traders understand the net buying or selling pressure in the market. A positive volume delta indicates more buying activity, while a negative volume delta indicates more selling activity.

Cumulative Volume Delta (CVD) aggregates the volume delta over time to provide a running total. This cumulative approach helps traders see the overall buying and selling pressure trends, making it easier to identify potential reversals or continuations in the market trend.
Notas de prensa
CVD Line Indicator v2.0 - Major Update

🎯 Overview
This major update transforms the CVD Line indicator into a comprehensive volume delta analysis tool with advanced coloring modes, threshold detection, and enhanced data collection capabilities.

✨ New Features

📊 Enhanced Data Collection
- Automatic 1-second/tick data support: When trading on 5-minute charts or below, the indicator automatically uses 1-second data (Premium+ plans) or tick data (Expert+ plans) for more precise delta calculations
- **Data availability detection**: Visual warnings and status indicators show when higher-resolution data is unavailable, with clear upgrade recommendations
- **Optimized default settings**: Now uses Chart anchor period for smooth per-bar delta tracking (no more daily jumps)

🎨 Advanced Coloring Modes
Choose how your CVD line is colored with four intelligent modes:

- CVD Bar: Colors based on current bar's volume delta (green = buying, red = selling)
- Slope: Shows directional momentum - green when MA rising, red when falling, blue when flat
- Threshold: Only highlights significant delta activity - colors appear only when delta exceeds your threshold (default 150% of average), otherwise stays neutral blue
- Fixed: Single neutral color for minimal distraction

📈 Multiple Moving Average Types
Expanded from just SMA to 12 different MA types:
- Traditional: SMA, EMA, WMA, RMA
- Advanced: HMA (Hull), DEMA, TEMA, ZLEMA
- Specialized: LSMA (Least Squares), SMMA, ALMA, SWMA

🎯 Threshold Detection System
Two independent threshold levels for different purposes:

Color Threshold (Default: 150%)
- Controls when CVD line changes color in "Threshold" mode
- Highlights bars with significant delta activity
- Fully customizable threshold percentage and lookback period

Extreme Detection (Default: 250%)
- Colors price candles when delta is exceptionally large
- Green candles = extreme buying pressure
- Red candles = extreme selling pressure
- Helps identify climactic volume moments

💥 Failed Pressure Detection
New background highlighting shows when large delta fails to move price:
- Red background: Bulls pushed hard (high buying delta) but candle closed lower - bulls failed
- Green background: Bears pushed hard (high selling delta) but candle closed higher - bears failed
- Only triggers on significant delta (above threshold) to avoid noise
- Excellent for spotting exhaustion and absorption

⚙️ Reorganized Settings Interface
Settings now organized into 5 logical groups:

1. Data Collection: Anchor period, timeframe selection, data source options
2. Moving Average: MA length, type, and timeframe threshold
3. Color & Display: Color mode and visual options
4. Color Threshold: Controls line coloring sensitivity
5. **Extreme Detection**: Controls candle coloring for huge delta bars

🔧 Improvements

- Better default settings: Chart anchor + MA mode + Threshold coloring = cleaner, more responsive indicator
- Enhanced tooltips: Every setting includes detailed explanations
- Theme compatibility: I know, the default colors are not great. But they work on both light and dark themes out of the box, so make them your own.

📋 Migration Notes

If you're upgrading from the previous version, note these default changes:
- Anchor period: Changed from "1D" to "Chart" (for smoother per-bar delta)
- MA threshold: Changed from "1D" to "All" (always shows MA by default)
- Color mode: Changed from "CVD Bar" to "Threshold" (less noise)
- Timeframe switch is replaced by a new setting where you choose the cutoff timeframe for raw CVD vs Moving Average.

🙏 Feedback Welcome

This update represents a complete overhaul based on user feedback and real-world trading needs. If you have suggestions for further improvements, please comment below!

Happy Trading! 📊✨

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.