OPEN-SOURCE SCRIPT
ZigZag Volume Profile [ChartPrime]

⯁ OVERVIEW
ZigZag Volume Profile [ChartPrime] combines swing structure with volume analytics by plotting a ZigZag of major price swings and overlaying a detailed volume profile around each swing. At the end of each swing, it highlights the Point of Control (POC) — the price level with the highest traded volume — and extends it forward to identify key areas of potential support or resistance.
⯁ KEY FEATURES
⯁ USAGE
⯁ CONCLUSION
ZigZag Volume Profile [ChartPrime] offers a powerful fusion of structure and volume. By plotting detailed volume profiles over each price swing and extending the POC as actionable S/R levels, this tool provides deep insight into market participation zones — giving traders a tactical edge in both ranging and trending environments.
ZigZag Volume Profile [ChartPrime] combines swing structure with volume analytics by plotting a ZigZag of major price swings and overlaying a detailed volume profile around each swing. At the end of each swing, it highlights the Point of Control (POC) — the price level with the highest traded volume — and extends it forward to identify key areas of potential support or resistance.
⯁ KEY FEATURES
- ZigZag Swing Detection:
Automatically detects swing highs and lows based on a user-defined length, creating clean visual segments of market structure.
These segments act as boundaries for volume profile calculations.Pine Script® swingHigh = ta.highest(swingLength) swingLow = ta.lowest(swingLength) - ZigZag Channel Visualization:
The ZigZag structure is connected with sloped lines, forming a visual “channel” of the price movement.
The ZigZag can optionally, scaled by ATR. - Volume Profile Around Each Swing:
For every completed swing (high to low or low to high), the indicator constructs a full volume profile using user-defined bin counts.
It scans volume across price levels in the swing and plots histogram-style bins using a gradient color to indicate volume magnitude. - Dynamic Bin Width and Slope Adjustment:
Bins are distributed across a vertical ATR-based range, and their width is adjusted based on the percentage of total swing volume.
The volume fill direction is adapted to the swing’s slope for visually aligned plotting. - POC Detection and Extension:
The highest volume bin in each swing is identified as the Point of Control (POC).
This level is plotted with a thicker line and extended horizontally into the future as a key reaction level. - Automatic POC Expiry on Price Interaction:
POC lines are continuously extended unless breached by price.
When price crosses the POC level, the extension is terminated — signaling that the level may have been absorbed. - Clean Volume Bin Visualization:
Bin colors range from green (low volume) to blue (higher volume), with the POC always marked in red by default for easy identification.
Volume percentages are optionally labeled at each bin level.
Flexible Swing Profile Parameters:
Users can control: - Number of volume bins
- Bin width
- Channel width (ATR factor)
- Visibility of the swing channel or POC lines
- Efficient Memory Handling:
Old POC lines and volume profiles are automatically removed from memory after a threshold to keep charts clean and performant.
⯁ USAGE
- Use ZigZag swings to define market structure visually.
- Analyze volume profile around each swing to understand where most trading activity occurred.
- Use POC extensions as dynamic support/resistance zones for entries, stops, or take-profits.
- Watch for price interaction with extended POC lines — breaks may suggest absorbed liquidity or breakout potential.
- Use the ATR-based channel width to adapt profiles based on market volatility.
⯁ CONCLUSION
ZigZag Volume Profile [ChartPrime] offers a powerful fusion of structure and volume. By plotting detailed volume profiles over each price swing and extending the POC as actionable S/R levels, this tool provides deep insight into market participation zones — giving traders a tactical edge in both ranging and trending environments.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.