OpeningRange
The high and low of the first minutes after a set clock time, and whether the close has broken out of them.
Opening Range takes the high and low of the bars inside a window that starts at a set clock time (9:30 by default, the regular open) and lasts a set number of minutes. From the first bar after that window it reports those two levels, plus two flags: whether the close is above the range high, and whether it is below the range low. The range is rebuilt every calendar day.
How to read it
- The range high and low draw as flat lines on the price chart from the end of the window to the end of the day.
- Breakout markers sit on every bar whose close is beyond the range, not only on the first one, so a run of markers is a move that held.
- Before the window ends there is no range, so nothing draws in the pre-market or during the window itself.
What it outputs
- Range high
- The highest high inside the day's opening window, held flat from the end of the window.
- Range low
- The lowest low inside the day's opening window, held flat from the end of the window.
- Breakout up
- On bars whose close is above the range high.
- Breakout down
- On bars whose close is below the range low.
When it fires
Breakout up is on for every bar, after the window, whose close is above the day's range high; breakout down, for every bar whose close is below the range low.
Settings
- range_minutes
- Length of the window that sets the range, counted from the start time. Raising it widens the range and delays the first output; lowering it gives a tight range that the close breaks more often.
- session_start_hour
- Hour the window opens. Changing it moves the range to another time of day. Values above 23 never match a bar, so the indicator never reports.
- session_start_minute
- Minute the window opens, added to the start hour. Values above 59 carry over into the hour, so 75 with hour 9 means 10:15.
Pitfalls
- A breakout stays on for as long as the close stays beyond the range, so it marks a held move rather than the moment of crossing.
- With extended hours included, after-hours bars still compare against the day's range and can fire on thin trading.
- A day with no bars inside the window has no range and no output.