True on the first bar of the regular trading session, ignoring any pre-market bars before it.
session.isfirstbar_regular is true on the bar that opens the regular session each day. On a stock chart with extended hours it is the opening bar at the regular start time, which is later than session.isfirstbar when pre-market bars are loaded.
Use it to anchor a calculation at the regular open, such as an opening range or a session VWAP, and to ignore pre-market bars.
Type
series bool
Remarks
- On a chart with no extended hours,
session.isfirstbarandsession.isfirstbar_regularare the same bar. - On Sidechair: the same as
session.isfirstbar: true when the bar's trading day differs from the previous bar's. The pre-market is not split off.
Example
//@version=6
indicator("Regular open", overlay = true)
plot(close, "Close", color.gray)
plotshape(session.isfirstbar_regular, "Regular open", shape.diamond, location.belowbar, color.green, size = size.tiny)See also
Runs on Sidechair