VSA Super Candles

🎯 Overview
This Pine Script was developed for VSA (Volume Spread Analysis) with a well-defined hierarchical priority system. The code identifies different types of market events based on volume, spread, and price behavior, painting candles with specific colors according to their importance.
🏗️ System Architecture
Priority System (Hierarchical)
🔴 Climatic Event (Red) - Maximum Priority
🟠 Big Boss (Orange) - Second Priority
🟣 Compression (Purple) - Third Priority
⚫ Normal (Gray) - Lowest Priority
📊 Event Types
🔴 Climatic Event (Red)
Characteristics:
Ultra-high volume (default: 310% of average)
Wide spread (above configured threshold)
"Wrong" close (opposite to bar direction)
Specific conditions:
Up bar that closes at low (Selling Climax)
Down bar that closes at high (Buying Climax)
VSA Concept: Represents extreme exhaustion of one side of the market, usually marking important reversal points.
🟠 Big Boss (Orange)
Characteristics:
Ultra-high volume (default: 250% of average)
Significant price displacement
Wide spread with real movement of candle body
Activated only when there's no Climatic Event
VSA Concept: Massive volume generating real displacement, indicating entry/exit of large players.
🟣 Compression (Purple)
Characteristics:
Average volume (between normal and high)
Signs of exhaustion or reversal
Differential: Horizontal volume analysis
Activation conditions:
Upthrust (higher high, closes down)
Minor selling climax (lower low, closes up)
Horizontal volume spike + average volume
VSA Concept: Support/resistance test with controlled volume, frequently precedes important movements.
⚫ Normal (Gray)
Characteristics:
Normal volume (default: 50% of average)
Normal displacement or automatic price exhaustion
Auto-activation: Detects exhaustion even with normal volume
🛠️ Technical Components
Storage Buffers
var bool[] buffer_climatico = array.new_bool()
var bool[] buffer_big_boss = array.new_bool()
var bool[] buffer_comprimido = array.new_bool()
var bool[] buffer_normal = array.new_bool()
Store event history
Limited to 100 values for optimization
Allow posterior statistical analysis
Horizontal Volume Analysis
Compares current volume with average of last 5 bars
Configurable multiplier factor (default: 1.5x)
Impact: Increases probability of identifying compressions
Automatic Exhaustion System
Up Exhaustion: Higher high + close lower than previous
Down Exhaustion: Lower low + close higher than previous
Works independently of volume
⚙️ Configurable Parameters
Parameter Default Description
Volume Average Length 60 Period for volume average
% Climatic Event 310% Threshold for climatic volume
% Big Boss 250% Threshold for Big Boss volume
% Normal Volume 50% Threshold for normal volume
Spread Threshold 0.7 Multiplier for wide spread
Close Position Threshold 0.3 Limit for "edge closes"
Horizontal Volume Factor 1.5 Multiplier for horizontal spike
📍 Visual Markers
Chart Symbols
🔴 Climatic Event: Red circles above/below bars
🟠 Big Boss: Orange circles indicating direction
⬆⬇ Compression: Purple arrows for reversals
H Horizontal Compression: Marks differentiated horizontal volume
Statistics Table
Position: Top right corner
Content:
Count of each event type (last 50 bars)
Current volume vs. average ratio
Update: Real-time on last bar
🎨 Color System
final_color = evento_climatico ? color.red :
big_boss ? color.orange :
comprimido ? color.purple :
vela_normal ? color.gray :
color.gray
Logic: The first true condition defines the color, respecting priorities.
🔄 Execution Flow
Basic Calculations: Average volume, spread, close position
Horizontal Analysis: Comparison with previous bars
Exhaustion Detection: Identification of reversal patterns
Priority Application: Sequential evaluation (Climatic → Normal)
Storage: Buffer updates
Visualization: Bar coloring and markers
📈 Implemented Improvements
Code Organization
Detailed comments in each section
Descriptive variable names
Clear and sequential IF/ELSE logic
Separation by functionality
Performance
Buffers with automatic cleanup
Optimized calculations
Limited history control
Advanced VSA Functionality
Hierarchical priority system
Horizontal volume analysis
Automatic exhaustion detection
Multiple types of climatic events
Usability
Configurable parameters
Real-time visual feedback
Performance statistics
Intuitive markers
🎓 Applied VSA Concepts
Volume Spread Analysis
Principle: Relationship between Volume, Spread, and Close reveals market intentions
Implementation: Each event type represents a specific VSA scenario
Smart Money vs. Retail
Climatic Event: Retail exhaustion, Smart Money entry
Big Boss: Direct Smart Money movement
Compression: Controlled testing/accumulation
Wyckoff Method
Absorption: Identified in compressions
Distribution/Accumulation: In climatic events
Mark-up/Mark-down: In Big Boss events
🚀 How to Use
Add the script to your TradingView chart
Configure parameters according to your timeframe and asset
Observe bar colors to identify events
Use markers for additional confirmation
Monitor the table for real-time statistics
📝 Important Notes
Script strictly respects priority hierarchy
Higher priority events always prevail
Horizontal analysis differentiates special compressions
Automatic exhaustion system captures subtle reversals
Performance optimized for real-time use
🔧 Installation
Open TradingView Pine Editor
Copy and paste the complete script
Click "Add to Chart"
Adjust parameters in the settings panel
Save to your indicator library
📊 Trading Applications
Entry Signals
Climatic Events: Look for reversal confirmations
Big Boss: Follow the displacement direction
Compression: Watch for breakouts after testing
Risk Management
Use event hierarchy to gauge market strength
Higher priority events suggest stronger moves
Normal events may indicate consolidation periods
Market Context
Trending Markets: Big Boss events show continuation
Range-bound Markets: Compressions at key levels
Reversal Points: Climatic events at extremes
🤝 Contributing
This script follows VSA principles and can be enhanced with:
Additional timeframe analysis
Alert system for key events
Backtesting capabilities
Custom color schemes
Version: Pine Script v6
Compatibility: TradingView
Author: Victor Eduardo Americo
Yalnızca davetli komut dosyası
Bu komut dosyasına yalnızca yazar tarafından onaylanan kullanıcılar erişebilir. Kullanmak için izin istemeniz ve almanız gerekir. Bu izin genellikle ödeme yapıldıktan sonra verilir. Daha fazla ayrıntı için aşağıdaki yazarın talimatlarını izleyin veya doğrudan Victoredbr ile iletişime geçin.
TradingView, yazarına tam olarak güvenmediğiniz ve nasıl çalıştığını anlamadığınız sürece bir komut dosyası için ödeme yapmanızı veya kullanmanızı ÖNERMEZ. Ayrıca topluluk komut dosyaları bölümümüzde ücretsiz, açık kaynaklı alternatifler bulabilirsiniz.
Yazarın talimatları
Uyarı: Erişim talebinde bulunmadan önce lütfen yalnızca davetli komut dosyaları kılavuzumuzu okuyun.
Feragatname
Yalnızca davetli komut dosyası
Bu komut dosyasına yalnızca yazar tarafından onaylanan kullanıcılar erişebilir. Kullanmak için izin istemeniz ve almanız gerekir. Bu izin genellikle ödeme yapıldıktan sonra verilir. Daha fazla ayrıntı için aşağıdaki yazarın talimatlarını izleyin veya doğrudan Victoredbr ile iletişime geçin.
TradingView, yazarına tam olarak güvenmediğiniz ve nasıl çalıştığını anlamadığınız sürece bir komut dosyası için ödeme yapmanızı veya kullanmanızı ÖNERMEZ. Ayrıca topluluk komut dosyaları bölümümüzde ücretsiz, açık kaynaklı alternatifler bulabilirsiniz.
Yazarın talimatları
Uyarı: Erişim talebinde bulunmadan önce lütfen yalnızca davetli komut dosyaları kılavuzumuzu okuyun.