OPEN-SOURCE SCRIPT
Volume Profile Levels - POC, Value Area, HVP/LVP

Volume Profile Levels — POC, Value Area, HVP/LVP
OVERVIEW
This indicator builds a fixed-range volume profile over a user-defined lookback window and extracts its key structural levels as horizontal lines: the Point of Control (POC), the Value Area boundaries (VAH/VAL), and local High/Low Volume Peaks (HVP/LVP). The goal is not the histogram itself but the levels it produces — clean, alertable support/resistance derived from where volume actually traded.
HOW IT WORKS
Volume distribution. For each bar in the lookback window, its volume is distributed evenly across the price bins that the bar's high–low range spans. The full range of the window is divided into a configurable number of rows.
POC and Value Area. The POC is the bin with the highest accumulated volume. The Value Area is expanded outward from the POC, adding the larger neighboring bin at each step, until the target percentage of total volume (70% by default) is covered.
HVP / LVP detection. A bin qualifies as a High Volume Peak when it is a local maximum and exceeds the bin average by a configurable multiplier. A Low Volume Peak is a local minimum below the average by a configurable multiplier. Up to six levels of each type are shown, ranked by volume.
MTF mode. The profile can be calculated on a higher timeframe while displayed on the current chart. In MTF mode the lookback is counted in higher-timeframe bars, and the histogram can be hidden automatically to keep the chart readable while the levels remain.
FEATURES
- Fixed-range volume profile with adjustable lookback, row count, and Value Area percentage
- POC, VAH/VAL, HVP, and LVP levels drawn as lines across the analyzed range
- Optional profile histogram on the right or left side of the chart
- Higher-timeframe profile calculation with automatic histogram hiding
- Three label modes: full text labels, minimal dots, or both
- Diagnostics table showing the profile's range, bin size, total volume, and level counts
ALERTS
All alerts use the generic alert() function: create one alert on the indicator with "Any alert() function call" and enable the events you want in the settings.
- POC / VAH / VAL cross (close crossing the level)
- HVP / LVP level cross (optional; can be noisy)
- SR Flip: after a level is broken, the alert fires if price retests the level with a wick within a configurable bar window while the close holds the breakout direction
- Value Area entry / exit
NOTES
- The profile is an approximation: volume is split evenly across each bar's range, as tick-level data is not available in Pine. Results depend on the chart timeframe and the lookback setting.
- Levels are recalculated on every bar, so they shift as the window rolls forward. This is a rolling analysis tool, not a fixed anchored profile.
- Works on any symbol that provides volume data.
OVERVIEW
This indicator builds a fixed-range volume profile over a user-defined lookback window and extracts its key structural levels as horizontal lines: the Point of Control (POC), the Value Area boundaries (VAH/VAL), and local High/Low Volume Peaks (HVP/LVP). The goal is not the histogram itself but the levels it produces — clean, alertable support/resistance derived from where volume actually traded.
HOW IT WORKS
Volume distribution. For each bar in the lookback window, its volume is distributed evenly across the price bins that the bar's high–low range spans. The full range of the window is divided into a configurable number of rows.
POC and Value Area. The POC is the bin with the highest accumulated volume. The Value Area is expanded outward from the POC, adding the larger neighboring bin at each step, until the target percentage of total volume (70% by default) is covered.
HVP / LVP detection. A bin qualifies as a High Volume Peak when it is a local maximum and exceeds the bin average by a configurable multiplier. A Low Volume Peak is a local minimum below the average by a configurable multiplier. Up to six levels of each type are shown, ranked by volume.
MTF mode. The profile can be calculated on a higher timeframe while displayed on the current chart. In MTF mode the lookback is counted in higher-timeframe bars, and the histogram can be hidden automatically to keep the chart readable while the levels remain.
FEATURES
- Fixed-range volume profile with adjustable lookback, row count, and Value Area percentage
- POC, VAH/VAL, HVP, and LVP levels drawn as lines across the analyzed range
- Optional profile histogram on the right or left side of the chart
- Higher-timeframe profile calculation with automatic histogram hiding
- Three label modes: full text labels, minimal dots, or both
- Diagnostics table showing the profile's range, bin size, total volume, and level counts
ALERTS
All alerts use the generic alert() function: create one alert on the indicator with "Any alert() function call" and enable the events you want in the settings.
- POC / VAH / VAL cross (close crossing the level)
- HVP / LVP level cross (optional; can be noisy)
- SR Flip: after a level is broken, the alert fires if price retests the level with a wick within a configurable bar window while the close holds the breakout direction
- Value Area entry / exit
NOTES
- The profile is an approximation: volume is split evenly across each bar's range, as tick-level data is not available in Pine. Results depend on the chart timeframe and the lookback setting.
- Levels are recalculated on every bar, so they shift as the window rolls forward. This is a rolling analysis tool, not a fixed anchored profile.
- Works on any symbol that provides volume data.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.