True when the bar falls in the pre-market session, before the regular open.
session.ispremarket is true for extended-hours bars that come before the regular session opens, and false in the regular session and after the close. It is only meaningful on intraday charts of symbols that have extended hours.
Use it to isolate pre-market behaviour, such as a gap setup, or to drop pre-market bars from a calculation. session.ismarket and session.ispostmarket cover the rest of the day.
Type
series bool
Remarks
- On a daily or higher chart there is no pre-market part to a bar, so the flag is false.
- On Sidechair: always false today, because extended-hours sessions are not distinguished. Bars before the open are treated as
session.ismarket.
Example
//@version=6
indicator("Pre-market", overlay = true)
plot(close, "Close", color.gray)
bgcolor(session.ispremarket ? color.new(color.blue, 85) : na)See also
Runs on Sidechair