Session Range Boxes - Asia / London / New York

621


OVERVIEW
This indicator draws the high-low range of the three main trading sessions (Asia, London, New York) as boxes on intraday charts. When a session ends, its high and low are projected forward as reference levels, the box is labelled with the session's range and with how that range compares to the same session's recent average, and optional signals mark the first confirmed close beyond a chosen session's range. It is built for instruments that trade around the clock, such as forex pairs, gold, oil and index CFDs.

WHAT MAKES IT DIFFERENT
- One time zone setting drives every session, and named time zones (for example America/New_York or Europe/London) adjust for daylight-saving time automatically, so the boxes stay on the correct hours throughout the year.
- Every completed range is compared with that session's own average over the last N sessions (for example "Asia 0.00412 | 64% of avg"). This shows at a glance whether a session was quiet or unusually wide compared with its normal behaviour.
- Breakout markers use only closed bars and only the range of a session that has already finished, so they never appear and then disappear.

HOW IT WORKS
- Each bar is tested against each session's hours with Pine's time() function, using the selected time zone. Sessions that cross midnight (for example 19:00-03:00) are supported.
- While a session is running, its box grows to the highest high and lowest low printed so far.
- When the session ends, the final high and low are stored. The range (high minus low) is compared with the average of the previous N completed ranges of the same session.
- If enabled, the completed high and low are extended to the right until the same session starts again.
- Previous-day high/low (optional) is taken from the prior completed daily bar of the symbol, so it stays fixed during the day.
- Breakout signal: outside the reference session, a bar that closes above the completed session high (or below the low) after closing at or inside it on the previous bar. Signals are evaluated only on confirmed bars. With "First breakout per side only", each side can trigger once until the reference session runs again.

HOW TO USE
1. Apply it to an intraday chart (1-hour or lower works best; 5-15 minutes gives the most precise boxes).
2. Choose the time zone you want to work in, then adjust the session hours if your preferred definitions differ from the defaults.
3. Use the completed Asian range as a reference during the London and New York sessions: note whether price is holding inside it or has closed beyond it.
4. Read the "% of avg" value: a very narrow session compared with its average often comes before range expansion, while a very wide session means a lot of the typical daily movement may already have happened. Treat this as context, not as a signal on its own.
5. Optionally create alerts with "Close above reference session high" / "Close below reference session low" (the conditions are already confirmed-bar based).

INPUTS
Time zone
- Session time zone: the zone used to read all session hours. "Exchange" uses the symbol's exchange time zone.
Sessions
- Asia / London / New York: show or hide each session, set its hours and set its color. Defaults (New York time): Asia 19:00-03:00, London 03:00-12:00, New York 08:00-17:00.
Boxes & levels
- Fill boxes / Transparency: box background on or off, and how transparent it is.
- Show session name and range: text inside each box, plus the range and % of average once the session completes.
- Average range lookback: how many previous sessions of the same type are averaged.
- Text size, Level line style.
- Extend completed session high/low: projects levels until that session starts again.
Previous day
- Show previous day high/low and its color.
Range breakout signals
- Reference session: Asia, London, New York or None. That session must be enabled.
- First breakout per side only: limits markers and alerts to the first close beyond each side.
- Show breakout markers and their colors.

NON-REPAINTING NOTES
- Session boxes update live while a session is in progress (that is the developing range), but a completed box and its stored high/low never change afterwards.
- Breakout markers and alerts require a closed bar.
- Previous-day levels are requested with the prior daily bar's values only (expression offset by one bar with lookahead enabled, the standard non-repainting form), so historical and real-time values match.

LIMITATIONS
- Intraday timeframes only. On higher timeframes a single bar can span several sessions, so session boundaries cannot be resolved accurately; the script shows a notice on daily and higher charts.
- Accuracy is limited by the chart timeframe: on a 1-hour chart a session starting at 08:30 is detected from the bar that opens at 09:00.
- Session times are definitions, not exchange facts. Brokers and data feeds differ in their trading hours and daily close, and symbols with gaps or thin data may show incomplete boxes.
- The range is shown in price units of the symbol. Pip and point conventions vary by instrument.
- Older boxes and lines are removed automatically when the drawing limits are reached.

This script is for educational and informational purposes only and is not financial advice. Trading CFDs and forex involves significant risk of loss.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน