OPEN-SOURCE SCRIPT
Overnight Range & Sessions - Multi-Index

Draws the overnight range (ONR) of the instrument's own overnight session —
not a generic fixed window — plus EU/US/Asia session boxes and the previous
day's cash close as a gap reference.
What makes it original: generic session tools apply one fixed overnight
window to everything. This one carries per-instrument overnight definitions
(indices, metals, oil, forex), supports fragmented quiet-phase sessions for
24h markets, detects US/EU DST shifts automatically from the Berlin-New York
time difference, and captures the cash close timeframe-independently so the
gap reference works on any chart resolution.
How it works:
- The overnight window is auto-selected per instrument (DAX, FTSE, US indices,
Russell, gold, silver, copper, oil, Nikkei, HK, forex) with a manual
override and a custom session input.
- Commodities/forex can use fragmented sessions: several small quiet-phase
boxes instead of one large overnight range.
- US/EU daylight-saving shifts are detected automatically from the
Berlin-New York time difference (manual override available).
- An info table shows the detected index, session window and mode; the
previous day cash close is drawn as a line for gap-up/gap-down context.
How to use it: before the cash open, read the overnight high/low as the first
breakout frame of the day — a cash-session break out of the ONR sets the
directional tone, while repeated rejections at the ONR edges frame fade
setups back into the range. Combine with the previous cash close line for gap
context (open above both ONR high and prior close is a very different day
than an open inside the range), and use the session boxes to see which region
built the current move.
not a generic fixed window — plus EU/US/Asia session boxes and the previous
day's cash close as a gap reference.
What makes it original: generic session tools apply one fixed overnight
window to everything. This one carries per-instrument overnight definitions
(indices, metals, oil, forex), supports fragmented quiet-phase sessions for
24h markets, detects US/EU DST shifts automatically from the Berlin-New York
time difference, and captures the cash close timeframe-independently so the
gap reference works on any chart resolution.
How it works:
- The overnight window is auto-selected per instrument (DAX, FTSE, US indices,
Russell, gold, silver, copper, oil, Nikkei, HK, forex) with a manual
override and a custom session input.
- Commodities/forex can use fragmented sessions: several small quiet-phase
boxes instead of one large overnight range.
- US/EU daylight-saving shifts are detected automatically from the
Berlin-New York time difference (manual override available).
- An info table shows the detected index, session window and mode; the
previous day cash close is drawn as a line for gap-up/gap-down context.
How to use it: before the cash open, read the overnight high/low as the first
breakout frame of the day — a cash-session break out of the ONR sets the
directional tone, while repeated rejections at the ONR edges frame fade
setups back into the range. Combine with the previous cash close line for gap
context (open above both ONR high and prior close is a very different day
than an open inside the range), and use the session boxes to see which region
built the current move.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.