Sidechair

session.* constants

Browse the reference

Which trading hours a symbol covers: session.regular for the main session, session.extended to include pre-market and after-hours.

Try it in the editor

session.regular and session.extended go in the session argument of ticker.new and ticker.modify. session.regular covers the main trading hours of the exchange and session.extended adds the pre-market and after-hours sessions where they exist.

Do not confuse them with the session.* variables such as session.ismarket, which tell you what the current bar belongs to, or with input.session, which asks the user for a time range.

Constants

NameValueDescription
session.extendedextendedRegular hours plus pre-market and after-hours.
session.regularregularThe exchange's main trading hours.

Remarks

  • Extended sessions add bars with thin volume; indicators fed with them behave differently around the open.
  • On Sidechair: ticker.new and other symbols are not supported yet; they warn once and return na.

Example

Pine ScriptExtended-hours tickerOpen in editor
//@version=6
indicator("Session", overlay = true)
ext = ticker.new(syminfo.prefix, syminfo.ticker, session.extended)
plot(close, "Close", color.blue)
bgcolor(session.ismarket ? na : color.new(color.gray, 90))
if barstate.islast
    label.new(bar_index, high, "Ticker: " + str.tostring(ext))

See also

Runs on Sidechair