OPEN-SOURCE SCRIPT
Aggiornato Prev Day/Week/Month/ON VP Levels

Based on Prev Day/Week VP Levels MADE BY ADAM by adam4530. Credit to the original author for the core session-reset and volume-profile calculation approach this script builds on. This script is only tested on Tradingview Premium subscription.
This indicator automatically plots the previous day's, week's, month's, and overnight session's volume profile levels — Point of Control (POC), Value Area High (VAH), and Value Area Low (VAL) — as clean horizontal levels, replicating the look of manually drawn key levels.
What's new vs. the original
How it works
Sessions are defined by a custom reset hour in a chosen timezone rather than midnight exchange time (default 18:00 New York). Weeks run from the Sunday-evening session open through the Friday close; months follow the same reset-hour boundary. The Overnight session instead uses a fixed time-of-day window (default 18:00–09:30) that wraps across midnight, finalizing into "previous ON" levels the moment RTH begins.
All profiles are calculated on a separate, configurable calculation timeframe — 1-minute by default for Day/Week/ON, 5-minute by default for Month — 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. Each period's profile distributes bar volume across price rows (default 1000), 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 period completes, its levels are drawn and stay fixed until the next rollover — the exact levels a trader would mark by hand at the start of each session.
Features
Intended use
Built for intraday traders who anchor execution around prior-session value: value area rotations, POC retests, acceptance/rejection outside prior value, and confluence with order flow, overnight range, or options-derived levels.
This indicator automatically plots the previous day's, week's, month's, and overnight session's volume profile levels — Point of Control (POC), Value Area High (VAH), and Value Area Low (VAL) — as clean horizontal levels, replicating the look of manually drawn key levels.
What's new vs. the original
- Previous Month profile, calculated on its own configurable timeframe (default 5m), kept separate from the Day/Week/ON timeframe so a full month of bars doesn't hit intrabar data limits.
- Previous Overnight (ON) profile — a configurable time-of-day session (default 18:00–09:30 New York) rather than a calendar-day session. It rolls over automatically the moment the session ends, replacing the prior ON levels.
- Independent styling per period — Day, Week, Month, and ON each get their own line color, width, and style, instead of one shared style for everything.
- Extend-to-latest-bar option — lines can stop at the current bar instead of running off the chart indefinitely, for a cleaner look (this is now the default).
How it works
Sessions are defined by a custom reset hour in a chosen timezone rather than midnight exchange time (default 18:00 New York). Weeks run from the Sunday-evening session open through the Friday close; months follow the same reset-hour boundary. The Overnight session instead uses a fixed time-of-day window (default 18:00–09:30) that wraps across midnight, finalizing into "previous ON" levels the moment RTH begins.
All profiles are calculated on a separate, configurable calculation timeframe — 1-minute by default for Day/Week/ON, 5-minute by default for Month — 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. Each period's profile distributes bar volume across price rows (default 1000), 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 period completes, its levels are drawn 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, Week, Month, and Overnight POC/VAH/VAL, each independently toggleable
- Custom session reset hour and timezone (DST-safe)
- Configurable ON session start/end time
- Separate calculation timeframe for Day/Week/ON vs. Month, row count, and value area %
- Independent line color, width, and style per period
- Choice of extending levels infinitely right or only to the latest bar
- Plain text labels with adjustable offset and size
- No repainting — only completed periods are plotted
Intended use
Built for intraday traders who anchor execution around prior-session value: value area rotations, POC retests, acceptance/rejection outside prior value, and confluence with order flow, overnight range, or options-derived levels.
Note di rilascio
Update:- Added a live, developing Current Day volume profile (POC/VAH/VAL lines
plus an optional full histogram) alongside the previous-period levels —
builds and expands in real time as the session progresses, resetting at
the next session boundary.
- Fixed the Current Day POC/VAH/VAL lines to stay anchored at the session
start and update in place, so they render as visible horizontal levels
instead of collapsing on every tick.
- Histogram location is now configurable: draw it to the right of the
chart (default) or anchored at the current day's start, with an
adjustable bar offset (default 20).
- Histogram rows increased to a 300 cap for finer HVN/LVN detail while
staying within the object budget.
Note di rilascio
Update:- Fixed a runtime error ("requested historical offset beyond the
historical buffer's limit") that could trigger on sessions running
past roughly 9-10 hours on lower timeframes. The Current Day
POC/VAH/VAL lines were re-anchoring to the session start bar on every
tick to update price, and that anchor point drifts further into
history as the session goes on — eventually exceeding what Pine can
reference. They now anchor once at session start and only move price
and extend forward from there.
Note di rilascio
fixed the chart view.Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.