OPEN-SOURCE SCRIPT
Cập nhật Upcoming Market Sessions

Upcoming Market Sessions
This lightweight script projects the exact starting times of the major global trading sessions directly into the future blank space of your chart. It features a customizable timezone selection and individual toggle switches for each market session to keep your workspace clean.
Why this script was created:
This indicator is built to make forecasting significantly easier by clearly highlighting upcoming session starts for the next 24 hours. When drawing out future price action, it is easy to find yourself constantly checking the bottom time axis to see which session your setup will land in.
This script gives a direct visual indication of exactly when you need to be back at your charts, and instantly shows if your forecasted move is landing inside a high-volume session for your traded instrument.
Features:
This lightweight script projects the exact starting times of the major global trading sessions directly into the future blank space of your chart. It features a customizable timezone selection and individual toggle switches for each market session to keep your workspace clean.
Why this script was created:
This indicator is built to make forecasting significantly easier by clearly highlighting upcoming session starts for the next 24 hours. When drawing out future price action, it is easy to find yourself constantly checking the bottom time axis to see which session your setup will land in.
This script gives a direct visual indication of exactly when you need to be back at your charts, and instantly shows if your forecasted move is landing inside a high-volume session for your traded instrument.
Features:
- Future Projections: Draws clean, vertical session lines into the future empty space where candles haven't formed yet.
- Flexible Session Toggles: Turn individual session lines (Sydney, Tokyo, London, New York) on or off depending on your asset.
- Customizable Inputs: Easily adjust the exact start hours (HHMM) and matching display colors directly in the indicator settings.
Phát hành các Ghi chú
Fixed Label & Line Stacking: Resolved an issue where sessions would appear duplicated or tripled (especially on lower timeframes like M15) during live market ticks. The script now dynamically flushes and clears previous real-time calculations before rendering the newest tick.Independent Session Clocking: Fixed a bug where overlapping time gaps caused Tokyo and New York lines to stack on top of each other. Each session now uses strict millisecond calculations relative to timenow to accurately project individual lines forward.
Memory Optimization: Rewrote the background array structures to prevent memory leaks during extended live chart sessions.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.