OPEN-SOURCE SCRIPT

Midnight Lines for Tokyo, London, New York

76
ممتاز 👌 إليك **تعريفًا محدثًا وكاملًا للمؤشر باللغتين العربية والإنجليزية**، مع إدراج توضيح دقيق لتعامل المؤشر مع **تغيّر التوقيت الصيفي والشتوي (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**.

### 🎯 الفائدة:

يساعد المتداولين على تحديد **بداية كل جلسة تداول رئيسية**، ومراقبة:

* **تداخل الجلسات** مثل لندن ونيويورك
* **تحركات السعر عند بداية اليوم الجديد**
* **استراتيجيات التداول الزمنية حسب الجلسة**

---

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.