OPEN-SOURCE SCRIPT
更新済

Tokyo London New York Session Highlighter

795
Tokyo London New York Session Highlighter shades the Tokyo, London and New York trading sessions directly on the chart background so users can see time-of-day context at a glance. It is a visual aid for intraday charts.

Each session is defined by its own hours, day mask and IANA timezone, so the correct local times are used throughout the year, including daylight-saving changes in London and New York.

### Features

- Background shading for the Tokyo, London and New York sessions, each with its own color, transparency and on/off switch.
- Overlap handling: choose a dedicated color for periods when more than one session is active, or use a Priority order of New York over London over Tokyo.
- Optional session start/end markers with neutral session codes: TYO, LDN and NY.
- Optional active-session high and low plotted only while that session is open.
- Optional compact top-right table showing each session's Active/Inactive state and the number of sessions currently active.
- Optional informational session start/end alerts.

### Inputs

- Sessions: enable/disable, hours, timezone and day mask for each of the three sessions.
- Day mask: 23456 = Monday to Friday, 1234567 = every day.
- Colors: color and transparency for each session and for overlaps.
- Display: overlap handling, markers, active high/low, and the status table.
- Alerts: a single switch for session start/end alerts.

### How it works

The script checks, for every bar, whether the bar falls inside each configured session using TradingView's time engine and the session's IANA timezone.

A session start is the first bar inside the session after a bar outside it. A session end is the first bar outside the session after a bar inside it.

No higher-timeframe requests are used. The script reads only the current chart's bars and time.

### Default session references

- Tokyo: 09:00-18:00, Asia/Tokyo
- London: 08:00-17:00, Europe/London
- New York: 08:00-17:00, America/New_York

These defaults are practical regional time references for intraday analysis. They are not universal market rules and may not match every broker, exchange, product, holiday schedule, or early close. Users can adjust the session times, timezones and active days in the Inputs tab.

### Originality and usefulness

This script is not only a static three-color background tool. It adds several practical context features:

1. Timezone-aware sessions
Each major session can use its own local IANA timezone. This helps London and New York remain aligned with local time changes such as daylight saving time.

2. Explicit overlap handling
When multiple sessions are active at the same time, the script can either use a dedicated overlap color or a clear priority order. This makes overlapping trading periods easier to identify.

3. Current-session range context
Optional high/low plots show the developing range of the active session. This can help users compare current price movement with that session's own developing range.

4. Compact active-session table
The table shows which sessions are currently active and how many sessions are active at the same time. This gives a quick status view without adding another pane.

5. Clean, non-directional design
The script does not label market direction, classify trend, or suggest a trading action. It only visualizes time-based context.

### Limitations

- Designed for intraday charts. On daily or higher timeframes, the script displays an informational notice and does not shade sessions.
- Session backgrounds only appear where bars exist on the chart. If a symbol has no trading data during a period, the script cannot fill missing bars.
- Holiday schedules, broker-specific trading breaks, exchange-specific sessions, and early closes are not detected automatically.
- Default session times are user-adjustable references, not universal market rules.
- It reflects the session hours and timezones configured by the user; users should verify them against the instrument and data feed.
- It shows time-of-day context only and does not analyze price beyond plotting the optional high/low of the active session.

### What this script does not do

- It does not generate trade signals.
- It does not provide entries, exits, targets, or position sizing.
- It does not predict future price movement.
- It does not claim improved performance, accuracy, or profitability.
- It does not use future data.
- It is not a strategy or backtest system.
- It is not financial advice.

### Suggested use

Use this on intraday charts where session timing is relevant, such as FX, index CFDs, futures, or other markets where regional trading activity may matter. Keep the chart clean so the session backgrounds, overlap periods, and optional range plots remain easy to read.

### Japanese notes / 日本語補足

このインジケーターは、東京・ロンドン・ニューヨークの各セッションをチャート背景色で可視化する、日中足向けの時間帯コンテキストツールです。

目的は、セッションごとの値動きの違いや、ロンドン・ニューヨークなどの重複時間帯を見やすくすることです。売買シグナル、エントリー、エグジット、目標値、ポジションサイズの提案は行いません。

主な機能

- 東京・ロンドン・ニューヨークの背景色表示
- セッション重複時の専用カラー表示、または優先順位表示
- セッション開始・終了マーカーの任意表示
- 現在進行中のセッション高値・安値ラインの任意表示
- 現在アクティブなセッションを表示する小型テーブル
- 各セッションの時間帯・曜日・タイムゾーン・色・透明度の調整
- セッション開始・終了の情報通知アラート

このスクリプトは日中足向けです。日足以上の時間足では、背景色によるセッション表示は行わず、情報メッセージのみを表示します。

初期値は一般的な地域別時間帯の参考設定であり、特定のブローカー、取引所、銘柄、祝日、短縮取引を完全に反映するものではありません。必要に応じて各自の取引対象に合わせて調整してください。

このスクリプトは、相場の時間帯を把握するための可視化ツールです。将来の値動き、成績、勝率、精度を示唆または保証するものではありません。投資助言ではありません。
リリースノート
Session visualization and usability update.

- Added a new input to show or hide the session list dashboard.
- Added a new input to show or hide the session background highlight independently from the focus-session lines.
- Improved dashboard readability with a slightly larger default layout, clearer text contrast and stronger active-row visibility.
- Dashboard session names now use their corresponding session colors, while the row backgrounds remain neutral to avoid color blending and reduce readability issues.
- Added more flexible Inputs controls for session colors, background transparency, dashboard text colors, text transparency, inactive-row transparency, active-row transparency, frame transparency and right-side padding.
- Improved the dashboard spacing so it is less likely to overlap with price-scale labels.
- Kept full-history session background highlighting available for historical intraday review.
- Kept the simplified chart design: no large range boxes, no chart text labels, no speech-bubble labels and no excessive marker clutter.
- Current focus-session high, low, midpoint, opening range and previous session high/low are shown with lightweight chart lines.
- When multiple tracked sessions are active, the focus-session display prioritizes New York > London > Tokyo.
- Improved timezone-aware session handling using both bar-open and bar-close session checks.
- Improved local session rollover handling for intraday symbols, 24-hour markets, session gaps and overnight sessions.
- Added neutral informational alert() notifications for session start, session end, pre-open timing, pre-close timing, focus changes, session overlaps, opening-range completion and optional previous-session high/low touches.
- Kept the script lightweight by avoiding large chart objects, chart text clutter, plot-heavy rendering and alertcondition-based plot counts.

This script is a time-of-day context and session-structure tool only. It does not generate buy or sell signals, does not predict market direction, does not make performance claims and does not provide financial advice.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。