OPEN-SOURCE SCRIPT
OSOK Opening Times

OSOK Opening Times marks the opening times of active trading periods with vertical lines. It automatically adjusts the periods shown to match your chart timeframe, using solid lines for the larger period and dotted lines for the smaller active period.
Each boundary pair marks the current period's opening and the next period's opening. This creates a clear time reference for the active day, week, month or quarter.
Timeframe visibility
The breakdown below shows the default line styles when all visibility settings are enabled.
A quarter is a three-month period. Quarterly boundaries appear on the 1W and 1M charts; the 3M chart itself displays no lines.
Active periods and shared boundaries
Only the active periods are displayed. As new periods begin, their boundaries replace the previous markers. On intraday charts, daily dotted lines bracket only the active daily candle.
When two displayed boundaries coincide, the larger period's line takes precedence. The first daily candle of the week uses the weekly opening line as its starting boundary, avoiding a duplicate daily line.
Appearance and customization
Opening times and chart support
The indicator follows the symbol's TradingView candle sessions. Changing the chart's display timezone does not redefine those openings.
Upcoming boundaries use projected opening times. The active periods are determined by the latest chart bar, including when using Bar Replay.
The indicator supports standard time-based charts and Heikin Ashi. Tick, Renko, Range, Kagi, Line Break and Point & Figure charts are excluded.
Each boundary pair marks the current period's opening and the next period's opening. This creates a clear time reference for the active day, week, month or quarter.
Timeframe visibility
The breakdown below shows the default line styles when all visibility settings are enabled.
- Intraday below 1D, including 15m, 1H and 4H
Solid: current week opening to next week opening.
Dotted: active day opening to next day opening. - Daily - 1D
Solid: current month opening to next month opening.
Dotted: active week opening to next week opening. - Weekly - 1W
Solid: current quarter opening to next quarter opening.
Dotted: active month opening to next month opening. - Monthly - 1M
Solid: none.
Dotted: current quarter opening to next quarter opening. - Other intervals above 1D, such as 2D, 2W and 3M
No lines are displayed.
A quarter is a three-month period. Quarterly boundaries appear on the 1W and 1M charts; the 3M chart itself displays no lines.
Active periods and shared boundaries
Only the active periods are displayed. As new periods begin, their boundaries replace the previous markers. On intraday charts, daily dotted lines bracket only the active daily candle.
When two displayed boundaries coincide, the larger period's line takes precedence. The first daily candle of the week uses the weekly opening line as its starting boundary, avoiding a duplicate daily line.
Appearance and customization
- Solid lines: black at 30% opacity by default.
- Dotted lines: black at 100% opacity by default.
- Line width: 1 by default.
- Visibility, color, opacity, style and width can be adjusted in the indicator's settings. Separate style settings are available for the different chart contexts.
Opening times and chart support
The indicator follows the symbol's TradingView candle sessions. Changing the chart's display timezone does not redefine those openings.
Upcoming boundaries use projected opening times. The active periods are determined by the latest chart bar, including when using Bar Replay.
The indicator supports standard time-based charts and Heikin Ashi. Tick, Renko, Range, Kagi, Line Break and Point & Figure charts are excluded.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
in the pursuit of excellence.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
in the pursuit of excellence.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。