How it is calculated
Each centre is open while the bar's start time on its own clock, daylight saving included, is in its hours: Sydney 07:00 to 16:00, Tokyo 09:00 to 18:00, London and New York 08:00 to 17:00, open included, close excluded, on a local Monday to Friday unless Days says every day. The followed session's high and low run from its first bar; when it ends they become the previous high and low. Minutes count from the open to the bar's start.
Reference: FX session hours on each city's clock: Sydney 07 to 16, Tokyo 09 to 18, London and New York 08 to 17
How to read it
The flags are 1 while open and 0 otherwise, on every bar. London and New York change their clocks on different Sundays, so in those weeks the overlap is an hour longer in UTC, which the local clocks get right. A bar counts by its start time, so use H1 or finer. Holidays are not known, and a session the data starts inside counts from its first bar.
In a strategy
A London breakout: with s = ctx.ind("sessions", session="london"), go long while s.overlap is 1 and the close breaks above s.prev_high, short below s.prev_low, or only trade while s.in_session is 1.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Sessionsession | Choice | "london" | London, New York, Tokyo, Sydney |
Daysdays | Choice | "mon_fri" | Monday to Friday, Every day |
What it draws
| Line | Drawn as |
|---|---|
| Session high | Steps |
| Session low | Steps |
| Previous high | Steps |
| Previous low | Steps |
Used in
No strategy template reads it yet.