OPEN-SOURCE SCRIPT
Prev Day/Week VP Levels MADE BY ADAM

Previous Day & Week Volume Profile Levels (POC / VAH / VAL)
This indicator automatically plots the previous day's and previous week's volume profile levels — Point of Control (POC), Value Area High (VAH), and Value Area Low (VAL) — as clean horizontal levels extended to the right of the chart, replicating the look of manually drawn key levels.
How it works
Sessions are defined by a custom reset hour in a chosen timezone rather than midnight exchange time. The default is 19:00 New York (crypto perpetual sessions); set it to 18:00 for CME futures like MNQ/NQ to match the Globex daily open. Weeks run from the Sunday-evening session open through the Friday close.
All profiles are calculated on a separate, configurable calculation timeframe (default 5-minute) through request.security, independent of the chart timeframe. This means the levels are identical on every chart resolution and remain visible even on a 1-minute chart, where the chart itself doesn't hold enough history to cover a full week. Each period's profile distributes bar volume across price rows (default 100), locates the POC as the highest-volume row, and expands the value area around it until it contains the configured share of total volume (default 70%).
Once a day or week completes, its levels are drawn across the current period and stay fixed until the next rollover — the exact levels a trader would mark by hand at the start of each session.
Features
Previous day and previous week POC, VAH, VAL (each toggleable)
Custom session reset hour and timezone (DST-safe)
Configurable calculation timeframe, row count, and value area percentage
Minimalist styling: line color, width, style (solid/dashed/dotted), plain text labels (pdaypoc, pweekvah, etc.) with adjustable offset and size
No repainting: only completed periods are plotted
Intended use
Built for intraday traders who anchor their execution around prior-session value: value area rotations, POC retests, acceptance/rejection outside prior value, and confluence with order flow or options-derived levels.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。