Sidechair

session.ispostmarket

Browse the reference

True when the bar falls in the post-market session, after the regular close.

Try it in the editor

session.ispostmarket is true for extended-hours bars that follow the regular close, and false during the regular session and before the open. It only applies to intraday charts of symbols with extended hours.

Use it to isolate after-hours moves, for example an earnings reaction, or to leave after-hours bars out of a calculation. session.ismarket and session.ispremarket cover the other parts of the day.

Type

series bool

Remarks

  • On a daily or higher chart there is no post-market part to a bar, so the flag is false.
  • On Sidechair: always false today, because extended-hours sessions are not distinguished.

Example

Pine ScriptAfter-hours backgroundOpen in editor
//@version=6
indicator("Post-market", overlay = true)
plot(close, "Close", color.gray)
bgcolor(session.ispostmarket ? color.new(color.purple, 85) : na)

See also

Runs on Sidechair