Sidechair

session.isfirstbar_regular

Browse the reference

True on the first bar of the regular trading session, ignoring any pre-market bars before it.

Try it in the editor

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.isfirstbar and session.isfirstbar_regular are 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

Pine ScriptRegular open markerOpen in editor
//@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