OPEN-SOURCE SCRIPT
Volume Profile + Pivot Levels [ChartPrime]

⯁ OVERVIEW
Volume Profile + Pivot Levels [ChartPrime] combines a rolling volume profile with price pivots to surface the most meaningful levels in your selected lookback window. It builds a left-side profile from traded volume, highlights the session’s Point of Control (PoC), and then filters pivot highs/lows so only those aligned with significant profile volume are promoted to chart levels. Each promoted level extends forward until price retests it—so your chart stays focused on levels that actually matter.
⯁ KEY FEATURES
⯁ SETTINGS
⯁ USAGE
⯁ WHY IT’S UNIQUE
Instead of plotting every pivot or every profile bar, this tool cross-checks pivots against the profile’s internal volume weighting. You only see levels where price structure and liquidity overlap—clean, data-driven levels that self-retire after interaction, so you can focus on what the market actually defends.
Volume Profile + Pivot Levels [ChartPrime] combines a rolling volume profile with price pivots to surface the most meaningful levels in your selected lookback window. It builds a left-side profile from traded volume, highlights the session’s Point of Control (PoC), and then filters pivot highs/lows so only those aligned with significant profile volume are promoted to chart levels. Each promoted level extends forward until price retests it—so your chart stays focused on levels that actually matter.
⯁ KEY FEATURES
- Rolling Volume Profile (Period & Resolution)
Calculates a profile over the last Period bars (default 200). The profile is discretized into Volume Profile Resolution bins (default 50) between the highest high and lowest low inside the window. Each bin accumulates traded volume and is drawn as a smooth left-side polyline for compact, lightweight rendering.Pine Script® HL = array.new<float>() // collect highs/lows over 'start' bars to define profile range for i = 0 to start - 1 HL.push(high), HL.push(low) H = HL.max(), L = HL.min() bin_size = (H - L) / bins // accumulate per-bin volume for i = 0 to bins - 1 for j = 0 to start - 1 if close[j] >= (L + bin_sizei) - bin_size and close[j] < (L + bin_size*(i+1)) + bin_size Bins += volume[j] - Delta-Aware Coloring
The script tracks up-minus-down volume across all period to compute a net Delta. The profile, PoC line, and PoC label adopt a teal tone when net positive, and maroon when net negative—an immediate read on buyer/seller dominance inside the window. - Point of Control (PoC) + Volume Label
Automatically marks the highest-volume bin as the PoC. A horizontal PoC line extends to the last bar, and a label shows the absolute volume at the PoC. Toggle visibility via PoC input. - Pivot Detection with Volume Filter
Identifies raw pivots using Length (default 10) on both sides of the bar. Each candidate pivot is then validated against the profile: only pivots that land within their bin and meet or exceed the Filter % threshold (percentage of PoC volume) are promoted to chart levels. This removes weak, low-participation pivots.Pine Script® // pivot promotion when volume% >= pivotFilter if abs(mid - p.value) <= bin_size and volPercent >= pivotFilter // draw labeled pivot level line.new(p.index - pivotLength, p.value, p.index + pivotLength, p.value, width = 2) - Forward-Extending, Self-Stopping Levels
Promoted pivot levels extend forward as dotted rays. As soon as price intersects a level (high/low straddles it), that level stops extending—so your chart doesn’t clutter with stale zones. - Concise Level Labels (Volume + %)
Each promoted pivot prints a compact label at the pivot bar with its bin’s absolute volume and percentage of PoC volume (ordering flips for highs vs. lows for quick read). - Lightweight Visuals
The volume profile is rendered as a smooth polyline rather than dozens of boxes, keeping charts responsive even at higher resolutions.
⯁ SETTINGS
- Volume Profile → Period: Lookback window used to compute the profile (max 500).
- Volume Profile → Resolution: Number of bins; higher = finer structure.
- Volume Profile → PoC: Toggle PoC line and volume label.
- Pivots → Display: Show/hide volume-validated pivot levels.
- Pivots → Length: Pivot detection left/right bars.
- Pivots → Filter % 0–100: Minimum bin strength (as % of PoC) required to promote a pivot level.
⯁ USAGE
- Read PoC direction/color for a quick net-flow bias within your window.
- Prioritize promoted pivot levels—they’re backed by meaningful participation.
- Watch for first retests of promoted levels; the line will stop extending once tested.
- Adjust Period/Resolution to match your timeframe (scalps → higher resolution, shorter period; swings → lower resolution, longer period).
- Tighten or loosen Filter % to control how selective the level promotion is.
⯁ WHY IT’S UNIQUE
Instead of plotting every pivot or every profile bar, this tool cross-checks pivots against the profile’s internal volume weighting. You only see levels where price structure and liquidity overlap—clean, data-driven levels that self-retire after interaction, so you can focus on what the market actually defends.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。