OPEN-SOURCE SCRIPT
已更新 Volume Profile + VAH, VAL, and POC

What it is
A clean, on-chart volume profile that approximates your visible range using a configurable Bars Back window. It builds a horizontal histogram of volume by price, splits each price bin into Buy vs Sell volume, draws POC, and computes Value Area High/Low (VAH/VAL). A Stealth Mode toggle switches to a subtle grayscale palette for low-key charts.
Why this instead of the built-in VPVR?
Buy/Sell split per bin: See which prices were defended by buyers vs sellers, not just total volume.
Value Area from POC outward: Classic expansion method until the selected % of total volume (default 70%).
Sleek borders & Stealth Mode: Crisp bin outlines and a one-click professional colorway.
Deterministic & fast: No sessions or anchors needed—set your Bars Back and go.
How it works (under the hood)
Window selection – Pine can’t read your viewport, so we approximate it with Bars Back (user input).
Binning – The window’s price range is divided into N bins.
Volume allocation – For each bar in the window:
Distribute Across Hi–Lo (optional): Spread volume across all bins the bar overlaps, weighted by overlap; or
Single-price mode: Assign all volume to one bin using a representative price (hlc3).
Buy/Sell split (two methods):
Body Proportional (recommended): Split by relative up/down body size (|close−open|).
Up/Down Candle: 100% buy if close ≥ open, else 100% sell.
POC & VA: Point of Control is the bin with max total volume. VAH/VAL expands from POC toward the higher-volume neighbor until the selected % of total volume is included.
Reading the visuals
Horizontal bars (right side): Total volume per price bin.
Left sub-segment = Sell volume
Right sub-segment = Buy volume
POC line: Price level with peak total volume.
VAH / VAL (dashed): Upper and lower bounds of the selected Value Area.
Borders: Each bin has a clean outer outline so the profile looks tight and organized.
Stealth Mode: Grayscale palette that preserves contrast without loud colors.
Key inputs (organized for clarity)
Theme
Stealth Mode: Toggles the grayscale look.
Core
Price Bins: Vertical resolution of the profile.
Lookback (Bars): Approximates your visible range.
Style
Profile Width (bars): How far the histogram extends to the right.
Bin Border Width: Outline thickness.
Markers & Lines
Show POC, Show VAH/VAL, Value Area %, VA line width.
Advanced
Distribute Volume Across Hi–Lo: More accurate, heavier compute.
Buy/Sell Split Method: Body Proportional (realistic) or Up/Down (simple).
Tips & best practices
Start with Body Proportional + Distribute Across ON for intraday accuracy.
If the chart lags, reduce Price Bins or Bars Back, or switch off distribution.
For small windows, fewer bins often looks cleaner (e.g., 30–60).
Stealth Mode plays nicely with both dark and light chart themes.
Limitations & notes
Viewport: Pine can’t access the actual visible bars; Bars Back is a practical stand-in.
Buy/Sell split: This is an approximation from candle bodies, not true bid/ask delta.
Designed for overlay; profile renders to the right of the latest bar.
A clean, on-chart volume profile that approximates your visible range using a configurable Bars Back window. It builds a horizontal histogram of volume by price, splits each price bin into Buy vs Sell volume, draws POC, and computes Value Area High/Low (VAH/VAL). A Stealth Mode toggle switches to a subtle grayscale palette for low-key charts.
Why this instead of the built-in VPVR?
Buy/Sell split per bin: See which prices were defended by buyers vs sellers, not just total volume.
Value Area from POC outward: Classic expansion method until the selected % of total volume (default 70%).
Sleek borders & Stealth Mode: Crisp bin outlines and a one-click professional colorway.
Deterministic & fast: No sessions or anchors needed—set your Bars Back and go.
How it works (under the hood)
Window selection – Pine can’t read your viewport, so we approximate it with Bars Back (user input).
Binning – The window’s price range is divided into N bins.
Volume allocation – For each bar in the window:
Distribute Across Hi–Lo (optional): Spread volume across all bins the bar overlaps, weighted by overlap; or
Single-price mode: Assign all volume to one bin using a representative price (hlc3).
Buy/Sell split (two methods):
Body Proportional (recommended): Split by relative up/down body size (|close−open|).
Up/Down Candle: 100% buy if close ≥ open, else 100% sell.
POC & VA: Point of Control is the bin with max total volume. VAH/VAL expands from POC toward the higher-volume neighbor until the selected % of total volume is included.
Reading the visuals
Horizontal bars (right side): Total volume per price bin.
Left sub-segment = Sell volume
Right sub-segment = Buy volume
POC line: Price level with peak total volume.
VAH / VAL (dashed): Upper and lower bounds of the selected Value Area.
Borders: Each bin has a clean outer outline so the profile looks tight and organized.
Stealth Mode: Grayscale palette that preserves contrast without loud colors.
Key inputs (organized for clarity)
Theme
Stealth Mode: Toggles the grayscale look.
Core
Price Bins: Vertical resolution of the profile.
Lookback (Bars): Approximates your visible range.
Style
Profile Width (bars): How far the histogram extends to the right.
Bin Border Width: Outline thickness.
Markers & Lines
Show POC, Show VAH/VAL, Value Area %, VA line width.
Advanced
Distribute Volume Across Hi–Lo: More accurate, heavier compute.
Buy/Sell Split Method: Body Proportional (realistic) or Up/Down (simple).
Tips & best practices
Start with Body Proportional + Distribute Across ON for intraday accuracy.
If the chart lags, reduce Price Bins or Bars Back, or switch off distribution.
For small windows, fewer bins often looks cleaner (e.g., 30–60).
Stealth Mode plays nicely with both dark and light chart themes.
Limitations & notes
Viewport: Pine can’t access the actual visible bars; Bars Back is a practical stand-in.
Buy/Sell split: This is an approximation from candle bodies, not true bid/ask delta.
Designed for overlay; profile renders to the right of the latest bar.
發行說明
Update made to orientation of Volume Profile. Additionally, added "Extend" options for POC, VAH, and VAL. Cleaned up user input display as well.開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。