OPEN-SOURCE SCRIPT
ที่อัปเดต:

World Digital Clock

1 701
Original code developed by br.tradingview.com/u/you_222/
In this update I added the Frankfurt stock exchange, left the times according to Western Europe, and added another light signal to identify whether the stock exchange is open or closed.

This indicator provides a digital clock and real-time status for major financial markets, including Tokyo, London, New York, and Frankfurt. It displays whether each market is currently OPEN or CLOSED, along with the time remaining until the market opens or closes. The indicator is designed to keep traders informed about market activity at a glance.

Key Features:
Digital Clock:

Displays the current time based on a user-defined UTC offset.
Customizable text color, size, and background color.
Market Status:

Shows whether each major market is OPEN or CLOSED.
Displays a countdown timer indicating the time remaining until the market opens or closes.
Includes markets for Tokyo, London, New York, and Frankfurt.
Color Indicators:

A green dot indicates the market is open.
A red dot indicates the market is closed.
Text colors for open and closed markets can be customized.
Customizable Layout:

Choose the table position on the chart (e.g., top right, bottom left).
Adjust text sizes for both the clock and market status.
Daylight Saving Time:

Automatically adjusts market opening and closing times based on daylight saving rules (e.g., summer and winter time).
Alerts:

Optionally triggers alerts when a market opens, keeping you updated in real-time.
Use Cases:
Perfect for day traders or swing traders who need to monitor global market activity.
Useful for keeping track of trading hours and planning strategies based on market availability.
Helps avoid trading outside active market hours, reducing slippage and volatility risks.
This versatile and customizable tool ensures you're always aware of market status and time zones, enhancing your trading efficiency and decision-making.
เอกสารเผยแพร่
update with clean chart.
เอกสารเผยแพร่
Bug Fix
เอกสารเผยแพร่
Bug Fix
เอกสารเผยแพร่
Bug Fix 3.6
เอกสารเผยแพร่
Correction and fix.
เอกสารเผยแพร่
Fix Bugs.
เอกสารเผยแพร่
Fix Time Bugs.
เอกสารเผยแพร่
fix time
เอกสารเผยแพร่
### **Summary of Modifications**
1. **Added Precise Market Hours**
- Adjusted **New York opening time** to support half-hour increments correctly (**15.5 instead of 15.30**).
- Implemented **daylight saving time adjustments** for each market.

2. **Improved Market Time Display**
- Replaced **time remaining** with **current local time** for each market.
- Now displays **HH:MM:SS** format for accuracy.

3. **Refined Market Status Colors**
- Restored **original green** for open markets (**#00aa00** instead of a brighter green).
- Kept **red** for closed markets (**#ff0000**).

4. **Enhanced Visual Indicators**
- **Added a colored dot** before the market name to indicate status.
- Ensured proper positioning and formatting for **better readability**.

These updates improve **accuracy, clarity, and usability** of the trading session dashboard. 🚀
เอกสารเผยแพร่
Fix NY status
เอกสารเผยแพร่
Fix UTC bugs
เอกสารเผยแพร่
FIX UTC Bugs
เอกสารเผยแพร่
Fix
เอกสารเผยแพร่
Fix
เอกสารเผยแพร่
Fiz UTC
เอกสารเผยแพร่
FIX US UTC
เอกสารเผยแพร่
fix us utc
เอกสารเผยแพร่
Fix Several Bugs.
เอกสารเผยแพร่
Fix de Summer time zone
เอกสารเผยแพร่
🟨 Feature Update: Pre-Open and Pre-Close Highlighting (Yellow Warning Color)
This update enhances the market clock indicator by adding a "warning zone" that visually alerts the user when a market is about to open or close within the next 15 minutes.

✅ What’s New:
If the current time is within 15 minutes (i.e. 0.25 hours) before a market opens or closes, the market status text will turn yellow.

This applies to all markets individually (e.g., Tokyo, London, New York, Frankfurt).

Once the market opens or closes, the color changes back to green (open) or red (closed), as usual.

🔧 How It Works:
In the get_market_status() function:

We calculate the current time in decimal hours.

We check two new conditions:

is_opening_soon: true if the time is between open_hour - 0.25 and open_hour.

is_closing_soon: true if the time is between close_hour - 0.25 and close_hour.

If either condition is true, the status color is set to yellow (color.yellow).

This makes the dashboard more informative and helps traders prepare just before the market opens or closes.
เอกสารเผยแพร่
Fix image
เอกสารเผยแพร่
✅ Key Updates:
🕒 1. Configurable Main Clock (UTC Offset)
The main digital clock now allows manual UTC offset input.

By default, it's set to UTC+2, corresponding to Germany/Luxembourg during Daylight Saving Time (DST).

🟡 2. Visual Yellow Warning (⚠️)
When a market is about to open or close within the next 15 minutes, its status turns yellow.

This gives you a visual cue to prepare for potential volatility.

🔔 3. Sound Alert 5 Minutes Before
A sound alert is triggered via the alert() function when 5 minutes remain before a market opens or closes.

You can enable these alerts in the TradingView alert settings.

Great for preparing entries, exits, or managing pending orders.

🌍 4. Accurate Daylight Saving Time (DST) Detection
The script detects whether each market is in daylight saving time:

New York: 2nd Sunday of March to 1st Sunday of November

London & Frankfurt: Last Sunday of March to last Sunday of October

Tokyo: No DST (always UTC+9)

🧼 5. Clean & Optimized Code
Improved variable naming (display_text instead of reserved text)

Modular logic using reusable functions

Consistent and modern visual layout

📌 Markets Tracked:
Tokyo

London

New York

Frankfurt

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน