OPEN-SOURCE SCRIPT
Atualizado Day Trading Session Levels

A clean, session‑accurate framework for intraday traders - maps-out critical levels from the prior session to save you prep time in the morning.
Automatically adapts to equities and futures, with all levels time‑anchored to the exact bar where they occurred.
Features
Prior Day High / Low (PDH / PDL)
Overnight High / Low (ONH / ONL)
Prior Day Value Area (VAH / VAL / POC)
Automatic Session Detection
Clean, Time‑Anchored Visuals
Minimal Mode
This indicator was built with help from AI-coding tools. Please reach out to me if you find issues or have suggestions for improvement.
Automatically adapts to equities and futures, with all levels time‑anchored to the exact bar where they occurred.
Features
Prior Day High / Low (PDH / PDL)
- Tracks the true previous RTH session
- Not based on calendar days
- Futures‑aware weekend handling (Thursday → Sunday/Monday)
Overnight High / Low (ONH / ONL)
- Combined overnight session
- Equities: After‑Hours + Pre‑Market
- Futures: Globex PM + Globex AM
- Levels reset at the correct session boundary
- Anchored to the bar where the extreme was made
Prior Day Value Area (VAH / VAL / POC)
- Calculated by full volume profile of the prior RTH session
- Identifies: POC (highest‑volume price), VAH / VAL (70% value area)
- Optional shaded value‑area region extending into the current session
Automatic Session Detection
- Adjusts logic for equities vs futures
- Handles Globex structure, dead zones, and weekend behavior
Clean, Time‑Anchored Visuals
- All levels extend forward using bar‑time anchoring
- Consistent across all timeframes
- Optional price‑scale markers and text labels
Minimal Mode
- One‑click option to show only: PDH, PDL, ONH, ONL
- Perfect for traders who want a clean, high‑signal chart.
This indicator was built with help from AI-coding tools. Please reach out to me if you find issues or have suggestions for improvement.
Notas de Lançamento
commented-out some un-used debug codeNotas de Lançamento
- Updated some visuals.
- ONH/ONL are now calculated as developing through the current overnight session and then remain fixed once regular trading hours begin. Reset upon end of regular trading hours session.
Notas de Lançamento
Unified session detection logic for futures versus equities.Notas de Lançamento
Update Notes - 2026-06-02- Updated Script to Pine v6
- Rebuilt the entire Prior Day RTH Volume Profile engine
- Replaced the old index‑based VP logic with a new timestamp‑based session reconstruction system. This eliminates multi‑timeframe drift and ensures VAH/VAL/POC match TradingView’s fixed‑range VP far more closely.
- Added timestamp tracking for RTH session boundaries
- RTH start/end are now stored using actual bar timestamps, not bar indexes. This makes the script fully stable across all chart timeframes.
- Optimized VP calculation for major performance gains
- The volume profile is now computed once per day at RTH close, instead of recalculating on every bar. Runtime performance is significantly improved, especially on 1m/5m charts.
- Replaced full-session rescans with cached session highs/lows
- The script now uses the stored RTH high/low instead of scanning thousands of bars to rediscover them.
- Improved volume distribution logic
- Volume is now distributed uniformly across each bar’s high–low range, producing a smoother and more accurate per‑price histogram.
- Reworked VAH/VAL/POC expansion logic
- The 70% value‑area expansion now uses a centered, bidirectional accumulation around the POC for more consistent results.
- Updated VAH/VAL/POC ray anchoring
- Rays are now anchored to the start of the prior RTH session, ensuring consistent alignment with other session‑based levels.
- General cleanup and stability improvements
- Removed redundant loops, reduced lookback windows, and improved internal state handling for more predictable behavior.
Notas de Lançamento
Added Prior Day's Close (PDC) anchored ray & labels.Notas de Lançamento
Fixed issue with PDC calculation, ensuring only a single ray is displayed on the chart from prior day, and no previous day before that.Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.