OPEN-SOURCE SCRIPT
Timebender - Day Separator

Timebender — NY Anchored Day Separator
Many traders rely on broker-based day boundaries, which often do not align with New York time — the primary liquidity clock for FX and macro-driven markets. When the trading day is anchored incorrectly, it can distort the reading of weekly structure, session behavior, and intraday narrative.
This script provides a clear and configurable way to anchor trading days to a user-defined timezone and visually separate them on the chart.
What This Script Does
Highlights individual trading days using background shading
Draws vertical separators at the exact start of each shifted trading day
Allows independent toggling of background highlights and separator lines
Supports day-specific coloring so each trading day is immediately recognizable
Enables manual timezone shifting so traders can align charts to New York regardless of broker feed
What Makes It Different
Most day separators rely strictly on exchange time. This script detects calendar transitions from a manually shifted timestamp, allowing traders to define their own day boundary.
This is particularly useful for traders who anchor their analysis to New York time rather than broker session clocks.
Combining optional background shading with precision separators also allows traders to switch between a macro view (highlighted days) and a minimal execution view (lines only) without loading multiple indicators.
How It Works (High-Level)
The script internally offsets the chart’s timestamp by the number of hours specified in the timezone setting. It then detects when a new calendar day begins from that adjusted time and renders the visual separator accordingly.
Because the calculation is based on shifted time rather than exchange time, the indicator maintains consistent day structure across brokers.
How To Use
Set the timezone shift to match the session you anchor your analysis to.
Example: New York is typically UTC-5 or UTC-4 during daylight saving time.
Enable background highlighting for a broader structural view.
Use vertical separators when a cleaner chart is preferred for execution.
Customize colors to match your chart template.
Who This Script Is For
FX traders
Session-based traders
ICT-style market structure traders
Traders using multiple brokers
Anyone who wants consistent day boundaries across charts
Notes
This script is designed as a chart-organization utility. It does not generate trade signals or provide market predictions.
Many traders rely on broker-based day boundaries, which often do not align with New York time — the primary liquidity clock for FX and macro-driven markets. When the trading day is anchored incorrectly, it can distort the reading of weekly structure, session behavior, and intraday narrative.
This script provides a clear and configurable way to anchor trading days to a user-defined timezone and visually separate them on the chart.
What This Script Does
Highlights individual trading days using background shading
Draws vertical separators at the exact start of each shifted trading day
Allows independent toggling of background highlights and separator lines
Supports day-specific coloring so each trading day is immediately recognizable
Enables manual timezone shifting so traders can align charts to New York regardless of broker feed
What Makes It Different
Most day separators rely strictly on exchange time. This script detects calendar transitions from a manually shifted timestamp, allowing traders to define their own day boundary.
This is particularly useful for traders who anchor their analysis to New York time rather than broker session clocks.
Combining optional background shading with precision separators also allows traders to switch between a macro view (highlighted days) and a minimal execution view (lines only) without loading multiple indicators.
How It Works (High-Level)
The script internally offsets the chart’s timestamp by the number of hours specified in the timezone setting. It then detects when a new calendar day begins from that adjusted time and renders the visual separator accordingly.
Because the calculation is based on shifted time rather than exchange time, the indicator maintains consistent day structure across brokers.
How To Use
Set the timezone shift to match the session you anchor your analysis to.
Example: New York is typically UTC-5 or UTC-4 during daylight saving time.
Enable background highlighting for a broader structural view.
Use vertical separators when a cleaner chart is preferred for execution.
Customize colors to match your chart template.
Who This Script Is For
FX traders
Session-based traders
ICT-style market structure traders
Traders using multiple brokers
Anyone who wants consistent day boundaries across charts
Notes
This script is designed as a chart-organization utility. It does not generate trade signals or provide market predictions.
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.
once you see what is possible, how can you do otherwise?
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.
once you see what is possible, how can you do otherwise?
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.