opening_range

forge.tafunctionSince Forge API 1
Signaturepython
forge.ta.opening_range(high: ArrayLike,low: ArrayLike,close: ArrayLike,time_open: ArrayLike,minutes: int = 30,session_hours: str = '08:00-17:00',session_tz: str = 'Europe/London') -> dict[str, np.ndarray]

The high and low of the first minutes of a session, and the closes that cross them.

Parameters

NameTypeDefault
highArrayLike
lowArrayLike
closeArrayLike
time_openArrayLike
minutesint30
session_hoursstr'08:00-17:00'
session_tzstr'Europe/London'

Indicator: Opening range

The range bars are those that open within minutes of the session start on the local clock. The range is the highest high and lowest low of the range bars so far, then of all of them for the rest of the session, and is empty outside it. breakout is 1 on a bar after the range whose close crosses above the range high, -1 when it crosses below the range low. A session already under way at the first bar of the data, or with no bar opening inside its range, has no range. time_open is in nanoseconds (UTC).