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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.