OPEN-SOURCE SCRIPT
Tape (Time and Sales) with CVD

📊 Tape (Time and Sales) with CVD & Velocity
Overview
A professional Time and Sales (Tape) indicator that displays real-time order flow data using Cumulative Volume Delta (CVD) to accurately identify buy and sell trades. Features a unique CVD-based Velocity metric to measure order flow intensity.
Key Features
🎯 CVD-Based Trade Detection
- Uses Cumulative Volume Delta to determine true buy/sell trades
- Positive CVD change = Buy orders (hitting the ask)
- Negative CVD change = Sell orders (hitting the bid)
- More accurate than traditional bid/ask comparison methods
⚡ Directional Velocity Metric
- Calculates CVD change rate over a customizable time window (default: 60 seconds)
- Displays the speed of order flow (lots per second)
- Color-coded based on direction:
- Blue: Bullish velocity (buyers in control)
- Red: Bearish velocity (sellers in control)
- Highlights when velocity exceeds your threshold
📋 Real-Time Tape Display
Each row shows:
- Price: Color-coded by tick direction (uptick/downtick)
- Size: Volume with buy/sell background colors
- Time: Customizable format and timezone
- CVD: Running cumulative volume delta value
🎨 Visual Features
- Large print highlighting: Automatically highlights significant orders
- Price tick coloring: See upticks and downticks at a glance
- Configurable colors: Fully customizable color scheme
- Flexible positioning: Place the tape anywhere on your chart
- Invertible display: Choose whether new prints scroll up or down
Settings
CVD Configuration
- Custom timeframe: Choose the resolution for CVD calculation (1S recommended for precision)
- Anchor period: Set the CVD reset period (Daily, Weekly, etc.)
Velocity Settings
- Enable/Disable: Toggle velocity metric on/off
- Period: Time window for velocity calculation (1-60 seconds)
- Precision: Decimal places to display
- Threshold: Set alert level for significant velocity
Tape Customization
- Tape length: Number of rows to display (1-100)
- Min print size: Filter out small trades
- Large size threshold: Define what qualifies as a "large" order
- Size precision: Control decimal places for volume display
Display Options
- Text size: Auto, tiny, small, normal, large, huge
- Position: Top/Middle/Bottom × Left/Center/Right
- Time format: Customize timestamp display (ISO 8601)
- Timezone: Use exchange time or specify custom IANA timezone
- Column visibility: Show/hide Price, Time, or CVD columns
- Invert direction: Reverse tape scroll direction
How to Use
For Scalpers & Day Traders
1. Watch the Velocity metric for sudden spikes in order flow intensity
2. Look for large prints highlighted in yellow - these often indicate institutional activity
3. Monitor the CVD column to see if buyers or sellers are dominating
4. Use price tick colors to spot momentum shifts in real-time
For Order Flow Analysis
- High velocity + large buy orders = Strong bullish pressure
- High velocity + large sell orders = Strong bearish pressure
- Velocity divergence from price = Potential reversal signal
- Consistent buy/sell flow = Trend confirmation
Best Practices
- Use 1S timeframe for most accurate CVD calculations on liquid markets
- Adjust Large Size Min based on the instrument's average volume
- Set Velocity Threshold to filter noise and highlight significant order flow
- Consider using smaller tape length (10-15 rows) for cleaner display
Technical Details
- Uses `ta.requestVolumeDelta()` for precise CVD calculation
- Leverages `request.security_lower_tf()` for sub-bar data access
- Real-time only (no historical replay to ensure data accuracy)
- Optimized performance with single-loop iteration
Requirements
- TradingView Premium, Pro, or Pro+ (required for lower timeframe data access)
- Works best on liquid markets with frequent trades
Notes
- The indicator displays real-time data only and will show "Waiting for real-time data..." until live trades occur
- CVD accuracy depends on the exchange's volume data quality
- Velocity is calculated as absolute value but color-coded by direction
---
*Perfect for order flow traders, tape readers, and anyone who wants to see what's happening beneath the price action in real-time.*
Credits
Original concept modified to use CVD-based buy/sell detection with added directional velocity metric.
---
License: Mozilla Public License 2.0
Overview
A professional Time and Sales (Tape) indicator that displays real-time order flow data using Cumulative Volume Delta (CVD) to accurately identify buy and sell trades. Features a unique CVD-based Velocity metric to measure order flow intensity.
Key Features
🎯 CVD-Based Trade Detection
- Uses Cumulative Volume Delta to determine true buy/sell trades
- Positive CVD change = Buy orders (hitting the ask)
- Negative CVD change = Sell orders (hitting the bid)
- More accurate than traditional bid/ask comparison methods
⚡ Directional Velocity Metric
- Calculates CVD change rate over a customizable time window (default: 60 seconds)
- Displays the speed of order flow (lots per second)
- Color-coded based on direction:
- Blue: Bullish velocity (buyers in control)
- Red: Bearish velocity (sellers in control)
- Highlights when velocity exceeds your threshold
📋 Real-Time Tape Display
Each row shows:
- Price: Color-coded by tick direction (uptick/downtick)
- Size: Volume with buy/sell background colors
- Time: Customizable format and timezone
- CVD: Running cumulative volume delta value
🎨 Visual Features
- Large print highlighting: Automatically highlights significant orders
- Price tick coloring: See upticks and downticks at a glance
- Configurable colors: Fully customizable color scheme
- Flexible positioning: Place the tape anywhere on your chart
- Invertible display: Choose whether new prints scroll up or down
Settings
CVD Configuration
- Custom timeframe: Choose the resolution for CVD calculation (1S recommended for precision)
- Anchor period: Set the CVD reset period (Daily, Weekly, etc.)
Velocity Settings
- Enable/Disable: Toggle velocity metric on/off
- Period: Time window for velocity calculation (1-60 seconds)
- Precision: Decimal places to display
- Threshold: Set alert level for significant velocity
Tape Customization
- Tape length: Number of rows to display (1-100)
- Min print size: Filter out small trades
- Large size threshold: Define what qualifies as a "large" order
- Size precision: Control decimal places for volume display
Display Options
- Text size: Auto, tiny, small, normal, large, huge
- Position: Top/Middle/Bottom × Left/Center/Right
- Time format: Customize timestamp display (ISO 8601)
- Timezone: Use exchange time or specify custom IANA timezone
- Column visibility: Show/hide Price, Time, or CVD columns
- Invert direction: Reverse tape scroll direction
How to Use
For Scalpers & Day Traders
1. Watch the Velocity metric for sudden spikes in order flow intensity
2. Look for large prints highlighted in yellow - these often indicate institutional activity
3. Monitor the CVD column to see if buyers or sellers are dominating
4. Use price tick colors to spot momentum shifts in real-time
For Order Flow Analysis
- High velocity + large buy orders = Strong bullish pressure
- High velocity + large sell orders = Strong bearish pressure
- Velocity divergence from price = Potential reversal signal
- Consistent buy/sell flow = Trend confirmation
Best Practices
- Use 1S timeframe for most accurate CVD calculations on liquid markets
- Adjust Large Size Min based on the instrument's average volume
- Set Velocity Threshold to filter noise and highlight significant order flow
- Consider using smaller tape length (10-15 rows) for cleaner display
Technical Details
- Uses `ta.requestVolumeDelta()` for precise CVD calculation
- Leverages `request.security_lower_tf()` for sub-bar data access
- Real-time only (no historical replay to ensure data accuracy)
- Optimized performance with single-loop iteration
Requirements
- TradingView Premium, Pro, or Pro+ (required for lower timeframe data access)
- Works best on liquid markets with frequent trades
Notes
- The indicator displays real-time data only and will show "Waiting for real-time data..." until live trades occur
- CVD accuracy depends on the exchange's volume data quality
- Velocity is calculated as absolute value but color-coded by direction
---
*Perfect for order flow traders, tape readers, and anyone who wants to see what's happening beneath the price action in real-time.*
Credits
Original concept modified to use CVD-based buy/sell detection with added directional velocity metric.
---
License: Mozilla Public License 2.0
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.