OPEN-SOURCE SCRIPT
已更新 Time Marker

█ OVERVIEW
Time Marker draws vertical lines and optional background bands at user-defined times on the chart. Use it to highlight market open/close, key session boundaries, or any recurring time of day across all trading days.
The indicator provides two time range markers and two single time markers, each independently configurable with its own timezone, color, and style.
█ FEATURES
Time Range Markers (2 available)
• Draw vertical lines at both the start and end of a defined time window
• Optional background band fills the session with a time-aligned highlight
• Each marker has independent timezone, start time, end time, color, line style, and line width
Single Time Markers (2 available)
• Draw a single vertical line at a specific time each day
• Useful for marking a single event like market open or a news release
All markers support:
• Timezone selection from UTC-12 to UTC+12
• Time selection in 30-minute intervals from 0000 to 2330
• Line styles: Solid, Dashed, or Dotted
• Line width from 1 to 4
█ HOW TO USE
1 — Enable a marker and select the desired timezone
2 — Set the start and end times (for range markers) or a single time (for single markers)
3 — Adjust color, line style, and width to your preference
4 — For range markers, enable "Show Band" to add a background highlight between the start and end lines
█ NOTES
Band edges align with exact session timestamps using bar_time positioning, so they do not overshoot bar boundaries. The indicator supports up to 500 lines and 500 boxes
Time Marker draws vertical lines and optional background bands at user-defined times on the chart. Use it to highlight market open/close, key session boundaries, or any recurring time of day across all trading days.
The indicator provides two time range markers and two single time markers, each independently configurable with its own timezone, color, and style.
█ FEATURES
Time Range Markers (2 available)
• Draw vertical lines at both the start and end of a defined time window
• Optional background band fills the session with a time-aligned highlight
• Each marker has independent timezone, start time, end time, color, line style, and line width
Single Time Markers (2 available)
• Draw a single vertical line at a specific time each day
• Useful for marking a single event like market open or a news release
All markers support:
• Timezone selection from UTC-12 to UTC+12
• Time selection in 30-minute intervals from 0000 to 2330
• Line styles: Solid, Dashed, or Dotted
• Line width from 1 to 4
█ HOW TO USE
1 — Enable a marker and select the desired timezone
2 — Set the start and end times (for range markers) or a single time (for single markers)
3 — Adjust color, line style, and width to your preference
4 — For range markers, enable "Show Band" to add a background highlight between the start and end lines
█ NOTES
Band edges align with exact session timestamps using bar_time positioning, so they do not overshoot bar boundaries. The indicator supports up to 500 lines and 500 boxes
版本注释
Added- Added 2 more Time Range Markers (now 4 total) and 2 more Single Time Markers
(now 4 total).
- Added a Display Settings panel with Show Past Days + Days to Show to limit
how far back markers are drawn (counts trading days only, skipping weekends).
- Added Show Future Days + Days to Project to project all enabled markers
forward onto future sessions (weekends automatically skipped).
- Added a Name field to every marker for easier identification.
- Added a Show Lines toggle to range markers, so a band can be shown without
its boundary lines.
- Added end-line and band pre-drawing: the session end line and shaded band
now appear at the moment the session opens, instead of filling in bar-by-bar.
Changed
- Upgraded from Pine Script v5 to v6.
- Replaced the separate Start/End time dropdowns on range markers with a
single, cleaner Session Time input (HHMM-HHMM).
- Range bands are now drawn as one complete box spanning the full session,
rather than being extended bar-by-bar until the session closes.
- Reorganized marker input rows (lines/style/band grouped on their own inline
rows).
Improved
- End lines and bands for past sessions render immediately and accurately
using computed session-end timestamps, with correct handling of sessions that
cross midnight.
- Future projections roll correctly across day boundaries and skip
Saturdays/Sundays.
版本注释
chart update开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。