OPEN-SOURCE SCRIPT
Midnight Lines for Tokyo, London, New York

ممتاز 👌 إليك **تعريفًا محدثًا وكاملًا للمؤشر باللغتين العربية والإنجليزية**، مع إدراج توضيح دقيق لتعامل المؤشر مع **تغيّر التوقيت الصيفي والشتوي (DST)** في لندن ونيويورك:
---
## 🇬🇧 **English Description (with DST behavior)**
**Indicator name:** *Midnight Lines for Tokyo, London, and New York*
**Purpose:**
This indicator automatically draws **vertical lines** on the chart at **midnight (00:00)** for the three major global trading sessions:
* **Tokyo**
* **London**
* **New York**
### 🔹 How it works:
1. The script checks each candle’s time using the built-in TradingView time zone function:
* `"Asia/Tokyo"`
* `"Europe/London"`
* `"America/New_York"`
2. When it detects **00:00** in any of these zones, it draws:
* A **vertical dotted line** that extends from the top to the bottom of the chart.
* A **label** at the top with the session name (e.g., “Tokyo Midnight”).
3. Each session has its own color for clarity:
* **Blue** → Tokyo Midnight
* **Green** → London Midnight
* **Red** → New York Midnight
### 🕒 Automatic Daylight Saving Time (DST) Adjustment:
The indicator automatically adapts to **Daylight Saving Time changes** in both **London** and **New York**:
* When London switches between **GMT and GMT+1**, the midnight line shifts automatically to remain accurate.
* When New York switches between **EST and EDT**, the script also updates accordingly.
* Tokyo does **not** observe DST, so its timing stays constant year-round.
### 🎯 Purpose:
Helps traders visually track the start of each new trading day in the major sessions and analyze:
* Session overlaps (e.g., London–New York overlap)
* Session-based trading strategies
* Price movement behavior at each new day open
---
## 🇸🇦 **الوصف بالعربية (مع إدراج تغير التوقيت)**
**اسم المؤشر:** خطوط منتصف الليل لجلسات طوكيو، لندن، ونيويورك
**الهدف:**
يقوم هذا المؤشر تلقائيًا برسم **خطوط عمودية** على الرسم البياني عند **منتصف الليل (00:00)** لكل من الجلسات الثلاث الرئيسية:
* **جلسة طوكيو**
* **جلسة لندن**
* **جلسة نيويورك**
### 🔹 كيفية العمل:
1. يستخدم المؤشر دوال TradingView لحساب الوقت الفعلي لكل مدينة:
* `"Asia/Tokyo"` لطوكيو
* `"Europe/London"` للندن
* `"America/New_York"` لنيويورك
2. عند وصول الساعة إلى **00:00** بتوقيت أي مدينة، يرسم المؤشر:
* **خطًا عموديًا متقطعًا** يمتد من أعلى إلى أسفل الرسم البياني.
* **تسمية (Label)** أعلى الخط باسم الجلسة (مثل “Tokyo Midnight”).
3. كل جلسة لها لون مختلف:
* **أزرق** → منتصف طوكيو
* **أخضر** → منتصف لندن
* **أحمر** → منتصف نيويورك
### 🕒 التعامل مع تغيّر التوقيت الصيفي والشتوي (DST):
يتكيّف المؤشر تلقائيًا مع تغيّر التوقيت في لندن ونيويورك:
* عندما تنتقل لندن بين **التوقيت الشتوي (GMT)** و**التوقيت الصيفي (GMT+1)**، يتحرك الخط تلقائيًا ليبقى في الساعة 00:00 المحلية.
* وعندما تنتقل نيويورك بين **EST** و**EDT**، يتم تعديل الخط كذلك تلقائيًا.
* أما طوكيو فلا تعتمد التوقيت الصيفي، لذا يبقى وقتها ثابتًا دائمًا على الساعة **00:00 JST**.
### 🎯 الفائدة:
يساعد المتداولين على تحديد **بداية كل جلسة تداول رئيسية**، ومراقبة:
* **تداخل الجلسات** مثل لندن ونيويورك
* **تحركات السعر عند بداية اليوم الجديد**
* **استراتيجيات التداول الزمنية حسب الجلسة**
---
---
## 🇬🇧 **English Description (with DST behavior)**
**Indicator name:** *Midnight Lines for Tokyo, London, and New York*
**Purpose:**
This indicator automatically draws **vertical lines** on the chart at **midnight (00:00)** for the three major global trading sessions:
* **Tokyo**
* **London**
* **New York**
### 🔹 How it works:
1. The script checks each candle’s time using the built-in TradingView time zone function:
* `"Asia/Tokyo"`
* `"Europe/London"`
* `"America/New_York"`
2. When it detects **00:00** in any of these zones, it draws:
* A **vertical dotted line** that extends from the top to the bottom of the chart.
* A **label** at the top with the session name (e.g., “Tokyo Midnight”).
3. Each session has its own color for clarity:
* **Blue** → Tokyo Midnight
* **Green** → London Midnight
* **Red** → New York Midnight
### 🕒 Automatic Daylight Saving Time (DST) Adjustment:
The indicator automatically adapts to **Daylight Saving Time changes** in both **London** and **New York**:
* When London switches between **GMT and GMT+1**, the midnight line shifts automatically to remain accurate.
* When New York switches between **EST and EDT**, the script also updates accordingly.
* Tokyo does **not** observe DST, so its timing stays constant year-round.
### 🎯 Purpose:
Helps traders visually track the start of each new trading day in the major sessions and analyze:
* Session overlaps (e.g., London–New York overlap)
* Session-based trading strategies
* Price movement behavior at each new day open
---
## 🇸🇦 **الوصف بالعربية (مع إدراج تغير التوقيت)**
**اسم المؤشر:** خطوط منتصف الليل لجلسات طوكيو، لندن، ونيويورك
**الهدف:**
يقوم هذا المؤشر تلقائيًا برسم **خطوط عمودية** على الرسم البياني عند **منتصف الليل (00:00)** لكل من الجلسات الثلاث الرئيسية:
* **جلسة طوكيو**
* **جلسة لندن**
* **جلسة نيويورك**
### 🔹 كيفية العمل:
1. يستخدم المؤشر دوال TradingView لحساب الوقت الفعلي لكل مدينة:
* `"Asia/Tokyo"` لطوكيو
* `"Europe/London"` للندن
* `"America/New_York"` لنيويورك
2. عند وصول الساعة إلى **00:00** بتوقيت أي مدينة، يرسم المؤشر:
* **خطًا عموديًا متقطعًا** يمتد من أعلى إلى أسفل الرسم البياني.
* **تسمية (Label)** أعلى الخط باسم الجلسة (مثل “Tokyo Midnight”).
3. كل جلسة لها لون مختلف:
* **أزرق** → منتصف طوكيو
* **أخضر** → منتصف لندن
* **أحمر** → منتصف نيويورك
### 🕒 التعامل مع تغيّر التوقيت الصيفي والشتوي (DST):
يتكيّف المؤشر تلقائيًا مع تغيّر التوقيت في لندن ونيويورك:
* عندما تنتقل لندن بين **التوقيت الشتوي (GMT)** و**التوقيت الصيفي (GMT+1)**، يتحرك الخط تلقائيًا ليبقى في الساعة 00:00 المحلية.
* وعندما تنتقل نيويورك بين **EST** و**EDT**، يتم تعديل الخط كذلك تلقائيًا.
* أما طوكيو فلا تعتمد التوقيت الصيفي، لذا يبقى وقتها ثابتًا دائمًا على الساعة **00:00 JST**.
### 🎯 الفائدة:
يساعد المتداولين على تحديد **بداية كل جلسة تداول رئيسية**، ومراقبة:
* **تداخل الجلسات** مثل لندن ونيويورك
* **تحركات السعر عند بداية اليوم الجديد**
* **استراتيجيات التداول الزمنية حسب الجلسة**
---
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.