OPEN-SOURCE SCRIPT

Sessions [Plug&Play]

189
This indicator automatically highlights the three major FX trading sessions—Asia, London, and New York—on your chart and, at the close of each session, draws right-extended horizontal rays at that session’s high and low. It’s designed to help you visually identify when price is trading within each session’s range and to quickly see where the highest and lowest prices occurred before the next major session begins.

Key Features:

Session Boxes

Draws a semi-transparent box around each session’s timeframe (Asia, London, New York) based on your local UTC offset.

Each box dynamically expands in real time: as new candles form during the session, the box’s top and bottom edges update to match the highest high and lowest low seen so far in that session.

When the session ends, the box remains on your chart, anchored to the exact candles that formed its boundaries.

High/Low Rays

As soon as a session closes (e.g., London session ends at 17:00 UTC+0 by default), two horizontal rays are drawn at that session’s final high and low.

These rays are “pinned” to the exact candles where the high/low occurred, so they stay in place when you scroll or zoom.

Each ray extends indefinitely to the right, providing a clear reference of the key supply/demand levels created during that session.

Session Labels

Optionally places a small “London,” “New York,” or “Asia” label at the top edge of each completed session’s box.

Labels are horizontally centered within the session’s box and use a contrasting, easy-to-read font color.

Customizable Appearance

Show/Hide Each Session: Toggle display of London, New York, and Asia sessions separately.

Time Ranges: By default, London is 08:00–17:00 (UTC), New York is 13:00–22:00 (UTC), and Asia is 00:00–07:00 (UTC). You can override each session’s start/end times using the “Time Range” picker.

Color & Opacity: Assign custom colors to each session. Choose a global “Dark,” “Medium,” or “Light” opacity preset to adjust box fill transparency and border shading.

Show/Hide Labels & Outlines: Turn the text labels and the box borders on or off independently.

UTC Offset Support

If your local broker feed or price data is not in UTC, simply adjust the “UTC Offset (+/–)” input. The indicator will recalculate session start/end times relative to your chosen offset.

How to Use:

Add the Indicator:

Open TradingView’s Pine Editor, paste in this script, and click “Add to Chart.”

By default, you’ll see three translucent boxes appear once each session begins (Asia, London, New York).

Watch in Real Time:

As soon as a session starts, its box will appear anchored to the first candle. The top and bottom of the box expand if new extremes occur.

When the session closes, the final box remains visible and two horizontal rays mark that session’s high and low.

Analyze Key Levels:

Use the high- and low-level rays to gauge session liquidity zones—areas where stop orders, breakouts, or reversals often occur.

For example, if London’s high is significantly above current price, it may act as resistance in the New York session.

Customize to Your Needs:

Toggle specific sessions on/off (e.g., if you only care about London and New York).

Change each session’s color to match your chart theme.

Adjust the “UTC Offset” so sessions align with your local time.

Disable labels or box borders if you prefer a cleaner look.

Inputs Overview:

Show London/New York/Asia Session (bool): Show or hide each session’s box and its high/low rays.

Time Range (session): Defines the start/end of each session in “HHMM–HHMM” (24h) format.

Colour (color): Custom color for each session’s box fill, border, and high/low rays.

Show Session Labels (bool): Toggle the “London,” “New York,” “Asia” text that appears at the top of each completed box.

Show Range Outline (bool): Toggle the box border (if off, only a translucent fill is drawn).

Opacity Preset (Dark/Medium/Light): Controls transparency of box fill and border.

UTC Offset (+/–) (int): Adjusts session times for different time zones (e.g., +1 for UTC+1).

Why It’s Useful:

Quickly Identify Session Activity: Visually distinguish when each major trading session is active, then compare price action across sessions.

Pinpoint High/Low Liquidity Levels: Drawn rays highlight where the market hit its extremes—critical zones for stop orders or breakout entries.

Multi-Timeframe Context: By seeing historical session boxes and rays, you can locate recurring supply/demand areas, overlap zones, or session re-tests.

Fully Automated Workflow: Once added to your chart, the script does all the work of tracking session boundaries and drawing high/low lines—no manual box or line drawing necessary.

Example Use Cases:

London Breakout Traders: See where London’s high/low formed, then wait for price to revisit those levels during the New York session.

Range Breakout Strategies: If price consolidates inside the London box, use the boxed extremes as immediate targets for breakout entries.

Intraday Liquidity Swings: During quieter hours, watch Asia’s high/low to identify potential support/resistance before London’s opening.

Overlap Zones: Compare London’s range with Asia’s range to find areas of confluence—high-probability reversal or continuation zones.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.