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.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.