OPEN-SOURCE SCRIPT
已更新 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.
發行說明
commented-out some un-used debug code發行說明
- 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.
發行說明
Unified session detection logic for futures versus equities.發行說明
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.
發行說明
Added Prior Day's Close (PDC) anchored ray & labels.發行說明
Fixed issue with PDC calculation, ensuring only a single ray is displayed on the chart from prior day, and no previous day before that.開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。