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