Vortex Volume Spectrum [JOAT]Vortex Volume Spectrum
Overview
Vortex Volume Spectrum is a dynamic, proportional volume profile indicator built from scratch in Pine Script v6. It analyses how traded volume distributes across price levels within any configurable lookback window, identifies the Point of Control (POC) — the price level with the highest volume concentration — and draws the Value Area (the 70% of total volume nearest the POC) as a live-updating profile rendered directly on the chart using the box drawing API. Unlike fixed-range volume profiles offered by some platforms, this engine recalculates on every bar and is fully parametric.
Why Build a Volume Profile in Pine?
Volume profile is one of the most powerful market microstructure tools available, revealing where the majority of market participants transacted. Most TradingView users rely on the built-in session profile which cannot be customised, scripted, or combined with other logic. Vortex Volume Spectrum gives Pine authors and traders a fully transparent, open-source volume distribution engine they can understand, modify, and build upon — with the visual quality of a professional charting suite.
Distribution Engine
The profile is built with a configurable number of price bins (default 30) spanning the high-to-low range of the lookback window. For each bin, the engine calculates the proportional contribution of each historical bar's volume using an overlap method:
Each bar contributes volume proportionally to the fraction of its high-to-low range that overlaps with each bin. A bar spanning multiple bins splits its volume across all overlapping bins by the fraction of overlap — preventing the unrealistic "winner takes all" binning used by simpler implementations.
This overlap-proportional distribution produces a smooth, accurate volume histogram that closely mirrors the actual traded price distribution.
POC Detection
After computing the full distribution array, the engine scans for the bin with the highest accumulated volume. This bin's midpoint is the Point of Control — the price level where the most volume traded during the lookback window. The POC is highlighted as the brightest horizontal line in the profile.
Value Area (70%) Calculation
Starting from the POC bin, the Value Area algorithm expands outward — one bin up and one bin down in alternating steps — absorbing bins into the Value Area until their cumulative volume equals or exceeds 70% of total profile volume. The result is a price range (Value Area High and Value Area Low) that contains the bulk of institutional activity. This range is where the majority of price acceptance occurred and serves as a reference for mean-reversion and breakout trading contexts.
Live Rendering at barstate.islast
The entire profile is rebuilt from scratch on each bar's final tick using the delete-before-create pattern: all existing profile boxes are deleted before redrawing. This ensures that the profile is always current without leaving ghost boxes on the chart. Each bin is drawn as a horizontal box scaled to its volume proportion relative to the maximum bin, using a gradient colour from muted (low volume) to bright teal (near-POC), with the POC bin rendered in gold.
Profile Elements
- Volume bins: Horizontal boxes scaled by proportional volume, coloured by intensity
- POC line: Gold horizontal line at the maximum-volume price level
- Value Area High / Low lines: Teal dashed lines marking the 70% value area boundary
- Volume Delta overlay: For each bar, buy volume (close > open) and sell volume (close < open) are tracked separately and displayed as a delta bar, showing the directional pressure within the profile window
Inputs Reference
- Profile Length (100) — number of bars included in the lookback window
- Number of Bins (30) — vertical resolution of the price distribution
- Profile Width (40 bars) — horizontal width of the rendered boxes
- Show POC Line — toggles the gold POC highlight
- Show Value Area — toggles the 70% Value Area High/Low lines
- Show Volume Delta — toggles the delta bar visualisation
- Profile Offset (0) — shifts the profile left or right from the current bar
- Theme: Dark / Light / Auto
How to Use
1. Add to any chart. The profile automatically spans the last N bars (configurable lookback).
2. The POC (gold line) is the most significant reference level — price tends to be attracted back to the POC when trading away from it.
3. The Value Area High and Low act as potential support/resistance zones. Breakouts above VAH with volume expansion are bullish continuation signals; breakouts below VAL signal bearish continuation.
4. If price is trading within the Value Area, expect range behaviour with mean reversion toward the POC.
5. Volume Delta bars help identify whether the current session's participation is predominantly buying or selling within the profiled window.
Non-Repainting Design
The profile always renders at barstate.islast using only confirmed historical bar data. No forward-looking data is accessed. The POC and Value Area lines represent historical distribution within the defined lookback and do not shift on historical bars.
Limitations
- Volume profiles are most meaningful on instruments with genuine, transparent volume (equities, futures, crypto on-chain exchanges). Forex tick volume is a proxy and may produce less reliable distribution shapes.
- Increasing the number of bins significantly increases the number of box objects drawn, approaching TradingView's per-indicator box limit on very long lookbacks.
- The profile always represents the most recent N bars — it does not anchor to specific sessions or swing levels. Session-anchored profiles require different logic.
- Very low-volume bins at the extremes are accurate but may appear invisible at small chart scales.
Disclaimer
This indicator is provided for educational and informational purposes only. Volume profile is a descriptive market microstructure tool and does not predict future price movement. Always use proper risk management in conjunction with your own analysis.
Made with passion by officialjackofalltrades
Indicador Pine Script®






















