Which trading hours a symbol covers: session.regular for the main session, session.extended to include pre-market and after-hours.
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
| Name | Value | Description |
|---|---|---|
session.extended | extended | Regular hours plus pre-market and after-hours. |
session.regular | regular | The 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.newand other symbols are not supported yet; they warn once and return na.
Example
//@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