Sidechair

session.islastbar_regular

Browse the reference

True on the last bar of the regular trading session, ignoring any extended hours that follow.

Try it in the editor

session.islastbar_regular is true on the last bar of the regular session each day. On a stock chart with extended hours it is the last bar before the post-market starts, which is earlier than session.islastbar.

Use it to mark the close of the regular day, or to finalise values such as the day's range, when you do not want after-hours bars to count.

Type

series bool

Remarks

  • On a chart with no extended hours, session.islastbar and session.islastbar_regular are the same bar.
  • On Sidechair: the same as session.islastbar: true when the next bar belongs to a different trading day, and false on the last bar of the chart.

Example

Pine ScriptRegular close markerOpen in editor
//@version=6
indicator("Regular close", overlay = true)
plot(close, "Close", color.gray)
plotshape(session.islastbar_regular, "Regular close", shape.diamond, location.abovebar, color.orange, size = size.tiny)

See also

Runs on Sidechair