OPEN-SOURCE SCRIPT
clock_sync

🕐 Clock Sync
A lightweight utility indicator that detects time synchronization issues between your local PC clock and the exchange server.
How it works:
On a 1-minute chart, the indicator compares the timestamp of the latest candle against your local system time. If the two don't match, a red clock emoji appears above the bar, alerting you to a potential desync. If your clock is in sync, nothing is displayed.
Why it matters:
Time mismatches can cause problems for traders who rely on precise execution timing, scheduled entries, or automation scripts. Even a one-minute drift can lead to unexpected behavior in time-sensitive strategies. This indicator gives you a quick visual confirmation that your clock is in sync with the exchange.
Settings:
- 24/7 Mode: Check this box to run the sync check continuously, ignoring the time window.
- Timezone: Select your local timezone from a list of major zones worldwide. Defaults to America/Los_Angeles.
- Start Hour / Start Minute: The time the sync check becomes active. Defaults to 00:00 (midnight).
- End Hour / End Minute: The time the sync check stops. Defaults to 06:28 AM.
- The time window supports overnight ranges (e.g., start at 22:00, end at 06:00).
Usage:
- Apply to any 1-minute chart.
- Configure your timezone and the hours you want monitoring active.
- If no emoji appears, your clock is synced or you are outside the active window.
- If a red clock label appears on the latest bar, your local time is out of sync with the exchange.
- Enable 24/7 Mode if you want continuous monitoring regardless of time of day.
Notes:
- Only active on 1-minute timeframes.
- Only evaluates the most recent (last) bar.
- Outside the configured time window, the indicator does nothing.
- Useful as a diagnostic tool alongside automated or time-based trading systems.
A lightweight utility indicator that detects time synchronization issues between your local PC clock and the exchange server.
How it works:
On a 1-minute chart, the indicator compares the timestamp of the latest candle against your local system time. If the two don't match, a red clock emoji appears above the bar, alerting you to a potential desync. If your clock is in sync, nothing is displayed.
Why it matters:
Time mismatches can cause problems for traders who rely on precise execution timing, scheduled entries, or automation scripts. Even a one-minute drift can lead to unexpected behavior in time-sensitive strategies. This indicator gives you a quick visual confirmation that your clock is in sync with the exchange.
Settings:
- 24/7 Mode: Check this box to run the sync check continuously, ignoring the time window.
- Timezone: Select your local timezone from a list of major zones worldwide. Defaults to America/Los_Angeles.
- Start Hour / Start Minute: The time the sync check becomes active. Defaults to 00:00 (midnight).
- End Hour / End Minute: The time the sync check stops. Defaults to 06:28 AM.
- The time window supports overnight ranges (e.g., start at 22:00, end at 06:00).
Usage:
- Apply to any 1-minute chart.
- Configure your timezone and the hours you want monitoring active.
- If no emoji appears, your clock is synced or you are outside the active window.
- If a red clock label appears on the latest bar, your local time is out of sync with the exchange.
- Enable 24/7 Mode if you want continuous monitoring regardless of time of day.
Notes:
- Only active on 1-minute timeframes.
- Only evaluates the most recent (last) bar.
- Outside the configured time window, the indicator does nothing.
- Useful as a diagnostic tool alongside automated or time-based trading systems.
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.