OPEN-SOURCE SCRIPT
Forex H/L Levels

# Forex H/L Levels — Day / Week / Month / Sessions
A single indicator that plots the running high and low of the current Day, Week, Month and of the four major Forex trading sessions (Sydney, Tokyo, London, New York) as horizontal levels with optional labels.
It is designed for day-traders and scalpers who use session highs/lows and higher-timeframe extremes as key liquidity and reaction points.
## Features
- **Higher-timeframe H/L** – rolling Day, Week and Month high & low, updated live on every candle.
- **Session H/L** – separate high and low for each session:
- Sydney 21:00–06:00 UTC
- Tokyo 00:00–09:00 UTC
- London 07:00–16:00 UTC
- New York 12:00–21:00 UTC
All time windows are computed in UTC, so the indicator behaves identically regardless of the chart’s timezone.
- **Fully customisable** – every level group has its own show/hide toggle, colour for the high and low, line style (solid / dashed / dotted) and line width.
- **Session background shading** – optional subtle tint for the currently active session so you can see at a glance who is driving price.
- **Smart, non-overlapping labels** – every enabled level is labelled with its name and exact price. When two or more levels are close in price, the labels are automatically laid out side-by-side in columns instead of stacking on top of each other. The "closeness" threshold is expressed as a multiple of ATR(14) and is user-configurable, so it adapts to any instrument or timeframe.
- **Non-repainting** – all lines and labels are drawn only on the last confirmed bar and are fully refreshed on every tick, so levels never duplicate and never repaint historical bars.
## Inputs
- **Daily / Weekly / Monthly** – show toggle, high colour, low colour, line style, line width.
- **Sydney / Tokyo / London / New York** – same controls as above; background shading is controlled by the same "show" toggle.
- **Labels**
- *Show level labels* – master toggle.
- *Label offset (bars right)* – how far to the right of the last bar the labels sit.
- *Label column spacing (bars)* – horizontal distance between columns when labels overlap.
- *Overlap threshold (× ATR14)* – labels whose prices are within this many ATR(14) of each other are placed side-by-side. Increase it if labels still visually overlap on your chart; decrease it if you want labels to stack only when truly on top of one another.
## How to use
1. Add the indicator to any chart (Forex, indices, crypto, stocks — all work).
2. Enable the level groups you care about from the settings panel.
3. Use the higher-timeframe levels (Daily / Weekly / Monthly H/L) as major S/R and breakout zones.
4. Use the session H/L as intraday liquidity pools — price very often sweeps the prior session’s high or low before reversing or continuing.
5. Tune the *Overlap threshold* so labels read cleanly on your timeframe; on intraday charts 0.3–0.5 × ATR works well, on higher timeframes 0.5–1.0 × ATR is usually enough.
## Notes
- London and New York overlap between 12:00 and 16:00 UTC — during that window both sets of levels will be visible, which is intentional and matches how traders actually watch those sessions.
- Because the indicator renders only on the last bar, scrolling back in time will not show historical session boxes; the goal is a clean, current snapshot of active levels, not a full historical replay.
## Disclaimer
This script is provided for educational and informational purposes only and does not constitute financial advice. Levels drawn by any indicator are objective price references — how you trade around them is your own responsibility. Past performance is not indicative of future results.
Open source — feel free to use, study and adapt.
A single indicator that plots the running high and low of the current Day, Week, Month and of the four major Forex trading sessions (Sydney, Tokyo, London, New York) as horizontal levels with optional labels.
It is designed for day-traders and scalpers who use session highs/lows and higher-timeframe extremes as key liquidity and reaction points.
## Features
- **Higher-timeframe H/L** – rolling Day, Week and Month high & low, updated live on every candle.
- **Session H/L** – separate high and low for each session:
- Sydney 21:00–06:00 UTC
- Tokyo 00:00–09:00 UTC
- London 07:00–16:00 UTC
- New York 12:00–21:00 UTC
All time windows are computed in UTC, so the indicator behaves identically regardless of the chart’s timezone.
- **Fully customisable** – every level group has its own show/hide toggle, colour for the high and low, line style (solid / dashed / dotted) and line width.
- **Session background shading** – optional subtle tint for the currently active session so you can see at a glance who is driving price.
- **Smart, non-overlapping labels** – every enabled level is labelled with its name and exact price. When two or more levels are close in price, the labels are automatically laid out side-by-side in columns instead of stacking on top of each other. The "closeness" threshold is expressed as a multiple of ATR(14) and is user-configurable, so it adapts to any instrument or timeframe.
- **Non-repainting** – all lines and labels are drawn only on the last confirmed bar and are fully refreshed on every tick, so levels never duplicate and never repaint historical bars.
## Inputs
- **Daily / Weekly / Monthly** – show toggle, high colour, low colour, line style, line width.
- **Sydney / Tokyo / London / New York** – same controls as above; background shading is controlled by the same "show" toggle.
- **Labels**
- *Show level labels* – master toggle.
- *Label offset (bars right)* – how far to the right of the last bar the labels sit.
- *Label column spacing (bars)* – horizontal distance between columns when labels overlap.
- *Overlap threshold (× ATR14)* – labels whose prices are within this many ATR(14) of each other are placed side-by-side. Increase it if labels still visually overlap on your chart; decrease it if you want labels to stack only when truly on top of one another.
## How to use
1. Add the indicator to any chart (Forex, indices, crypto, stocks — all work).
2. Enable the level groups you care about from the settings panel.
3. Use the higher-timeframe levels (Daily / Weekly / Monthly H/L) as major S/R and breakout zones.
4. Use the session H/L as intraday liquidity pools — price very often sweeps the prior session’s high or low before reversing or continuing.
5. Tune the *Overlap threshold* so labels read cleanly on your timeframe; on intraday charts 0.3–0.5 × ATR works well, on higher timeframes 0.5–1.0 × ATR is usually enough.
## Notes
- London and New York overlap between 12:00 and 16:00 UTC — during that window both sets of levels will be visible, which is intentional and matches how traders actually watch those sessions.
- Because the indicator renders only on the last bar, scrolling back in time will not show historical session boxes; the goal is a clean, current snapshot of active levels, not a full historical replay.
## Disclaimer
This script is provided for educational and informational purposes only and does not constitute financial advice. Levels drawn by any indicator are objective price references — how you trade around them is your own responsibility. Past performance is not indicative of future results.
Open source — feel free to use, study and adapt.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.