Opening range
The high and low of the first minutes of a session, with breakout signals.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| minutes | int | 30 | 1 to 1440 |
| session_hours | session | 08:00-17:00 | |
| session_tz | text | Europe/London |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| or_high | value | Optional | color theme.accent, style step, width 1 |
| or_low | value | Optional | color theme.accent, style step, width 1 |
| breakout | event | Optional | color_down theme.down, color_up theme.up, shape circle, style marker, where above_bar |
- Warm-up
- 0 bars (0 at the defaults)
- Repaints
- No
- Parity
- None
Formula
The session runs from the start to the end of session_hours in session_tz. Its range bars are those that open within the first minutes minutes after the start, on the local clock.
or_high and or_low are the highest high and lowest low of the range bars so far, then of all of them for the rest of the session. They are empty outside the session.
breakout is +1 on a bar after the range whose close crosses above or_high, and -1 when the close crosses below or_low. A session already under way at the first bar of the data, or with no bar opening inside its range, has no range. A missing bar ends the session's range from that bar.