OPEN-SOURCE SCRIPT
Telah dikemas kini Intraday Session Ranges (Asian-London-NY) - JonathanJD86

This script is a technical utility designed to automatically track and visualize the high and low price levels of the three major trading sessions (Asian, London, and New York).
How it works: The script uses the time() function with the America/New_York timezone anchor to ensure accuracy regardless of the user's local time. It tracks the maximum and minimum price values during specific user-defined intervals.
Key Methodology:
Vertical Tick Offset: Unlike standard session boxes, this tool allows users to set a vertical gap (in ticks) so that the labels do not overlap the candle wicks, providing a clearer view of the actual price action.
Session Intervals: Defaulted to high-activity windows: Asian (20:00-00:00), London (02:00-05:00), and New York (08:30-16:00).
Dynamic Visibility: The script includes a logical check to automatically hide levels on timeframes higher than 1H, preventing chart clutter during macro analysis.
How it works: The script uses the time() function with the America/New_York timezone anchor to ensure accuracy regardless of the user's local time. It tracks the maximum and minimum price values during specific user-defined intervals.
Key Methodology:
Vertical Tick Offset: Unlike standard session boxes, this tool allows users to set a vertical gap (in ticks) so that the labels do not overlap the candle wicks, providing a clearer view of the actual price action.
Session Intervals: Defaulted to high-activity windows: Asian (20:00-00:00), London (02:00-05:00), and New York (08:30-16:00).
Dynamic Visibility: The script includes a logical check to automatically hide levels on timeframes higher than 1H, preventing chart clutter during macro analysis.
Nota Keluaran
Update: UI Optimization & Customizable BackgroundsThis update focuses on improving chart clarity and user experience by providing more control over visual elements.
What’s New:
Minimalist View by Default: The session background highlights are now disabled by default (show_bg = false) to ensure a cleaner look upon loading.
Toggleable Highlights: Users can now easily enable or disable the colored session columns through the "Show Background Highlight" option in the settings.
Enhanced Tooltips: Added descriptive tooltips to the input parameters to help users understand the functionality of each setting directly from the configuration panel.
General Overview & Methodology
This script is a technical utility designed to automatically track and visualize the high and low price levels of the three major trading sessions (Asian, London, and New York).
How it works: The script uses the time() function with the America/New_York timezone anchor to ensure accuracy regardless of the user's local time. It tracks the maximum and minimum price values during specific user-defined intervals.
Vertical Tick Offset: Unlike standard session boxes, this tool allows users to set a vertical gap (in ticks) so that the labels do not overlap the candle wicks, providing a clearer view of the actual price action.
Session Intervals: Defaulted to high-activity windows:
Asian (20:00 - 00:00)
London (02:00 - 05:00)
New York (08:30 - 16:00)
Dynamic Visibility: The script includes a logical check to automatically hide levels on timeframes higher than 1H, preventing chart clutter during macro analysis.
Nota Keluaran
What’s New:New "Session Toggle" Group: I have added a dedicated settings group that allows you to independently enable or disable each session.
✅ Show Asian Session: Toggle visibility for the Asian range.
✅ Show London Session: Toggle visibility for the London range.
✅ Show NY Session: Toggle visibility for the New York range.
Minimalist Default State: Session background highlights are now disabled by default (show_bg = false) to keep your workspace clean.
Custom Highlights: You can still re-enable session backgrounds manually via the "Show Background Highlight" option.
Interactive Tooltips: Added clear descriptions to the input panel to guide you through each setting.
Nota Keluaran
Release Notes: Session Bias Analysis & Visual OverhaulThis update introduces a new analytical layer to the script, allowing traders to quickly identify the sentiment of each session at a glance.
New Analytical Features:
Session Bias Icons: Added clean visual identifiers to mark the closing sentiment of each session:
▲ (Green Triangle): Bullish session (Price closed near the session high).
▼ (Red Triangle): Bearish session (Price closed near the session low).
◆ (Orange Diamond): Range/Neutral session (Price closed near the center).
Adjustable Sensitivity: New "Range % Threshold" setting (Default: 30%). This defines the area required for a bullish or bearish classification. For example, at 30%, the price must close within the top 30% of the session range to trigger the bullish icon.
Visibility Control: Added a toggle to enable/disable these icons via "Show Session Bias Icon".
Improved Session Management:
New "Session Toggle" Group: Independent controls to show/hide the Asian, London, or New York sessions specifically.
UI Refinement: Background highlights are now optional and disabled by default (show_bg = false) for a cleaner price action focus.
Configuration Tooltips: Comprehensive descriptions added to all settings for better user guidance.
Nota Keluaran
What's New:- Day Open Line: Added a midnight (NY) day open line with a "DOp" label. Configurable color, style, and width.
- Session Range Boxes: Added boxes that display each session's high/low range, with adjustable fill and border transparency, plus a max-boxes limit to keep the chart clean.
- Post-Session Level Extension: Session High/Low levels now extend forward after the session ends, and automatically stop extending once price taps them (mitigation logic). Includes a max-sessions-to-extend limit.
Nota Keluaran
v2.0 — Major updateNew features:
Session Volume Profile — POC, VAH and VAL calculated per session using lower-timeframe data, drawn within each session's range. Optional horizontal volume histogram. Keeps up to 5 previous profiles per session.
Sweep detection & alerts — When price sweeps an extended session High/Low, the level is marked with an ✕ at the exact sweep point and an alert fires. To enable notifications, create an alert on this indicator using the "Any alert() function call" condition.
Session Equilibrium (50%) — Dotted midline of each session's range, extended forward alongside the H/L levels.
8:30 AM NY Open line — In addition to the existing Midnight (00:00) Day Open.
Asian Range Deviations — Projects ±0.5x / ±1x / ±2x of the Asian range as potential expansion targets for London and NY.
Session Stats Table — Last completed range per session vs. its average (configurable lookback), with color-coded % (orange = compressed range, red = extended range).
Improvements:
Increased drawing object limits for smoother history rendering
Defensive handling when the chart loads mid-session
Refactored open-line logic (Midnight and 8:30 share the same engine)
Nota Keluaran
Minor housekeeping — updated chart snapshot to better showcase the new session volume profile and sweep markers.Nota Keluaran
v2.1 — EQ & Volume Profile refinementsSession Equilibrium redesigned — The 50% line is now drawn contained within its session's range (from session start to session end), matching the volume profile behavior, instead of extending forward. A small "EQ" tag marks each line. EQ history now follows the Max Boxes to Keep setting.
Per-session toggles — Both the Session Equilibrium and the Session Volume Profile can now be enabled/disabled individually per session (Asian / London / NY), in addition to their master switches. This lets you keep, for example, only the Asian and London profiles as context while hiding the rest.
Nota Keluaran
v2.2 — HTF Levels & Session OpenNew features:
Previous Day / Week / Month High & Low — PDH/PDL, PWH/PWL and PMH/PML drawn from the start of the current period and extended forward, each with its own tag, color and toggle. Levels are taken from the fully closed previous period, so they never repaint.
Session Open Line — Each session's opening price is now marked with a dashed line and an "O" tag, drawn contained within its session (from session start to session end), consistent with the Session Equilibrium and Volume Profile behavior. Individually toggleable per session (Asian / London / NY).
With this update, each session box carries its full internal structure — Open, Equilibrium (50%) and Volume Profile (POC/VAH/VAL) — while only true reference levels (extended session H/L, Asian deviations and HTF levels) project forward on the chart.
Nota Keluaran
v2.3 — NY Session DividersNew feature:
NY Session Dividers — Vertical lines drawn inside the NY session box to split it into its three natural blocks: AM (9:30–12:00), Lunch (12:00–13:30) and PM (13:30–16:00). The dividers are contained within the box and stretch vertically as the session range expands, so they never project outside the session. Both times are configurable, along with color, style and how many days to keep on the chart.
This makes the internal rhythm of the New York session readable at a glance — separating the high-participation AM window from the low-liquidity lunch period and the afternoon block, each of which behaves differently in terms of range expansion and follow-through.
Nota Keluaran
v2.4 — UpdateNew
Day Open & 8:30 lines — Extension Mode: choose between Current Bar (line ends at the latest candle, label follows it) or Infinite (extends right). Optional price in the label.
Session Close line: when a session ends, a line is drawn at the session's closing price, contained within the session range (same as the Session Open line), with a "C" label. Toggle per session (Asian / London / NY), configurable line style and optional price in the label.
HTF Levels (PDH/PDL, PWH/PWL, PMH/PML) — Extension Mode: Current Bar or Infinite. Labels now travel with the current candle and can show the level price (e.g. PDH 20154.25).
Sweep Marker style: the ✕ mark can now be replaced by a bubble (circle in the session's color). Selectable marker style and size (Tiny / Small / Normal).
Fixed
Sweep detection on extended H/L now runs on every bar, including inside the following session. Previously, older extensions were only checked once the current session ended, which could place a sweep mark at the session close instead of on the candle that actually swept the level.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.