Language version: 2 · Reference version: 2.7 · Date: 2026-10-25 · Compiler build: df7b3b14 · Namespace: session · Entries: 3
session (library)
Definition
Two values about the session the current bar falls in: its date, and whether this is the session’s first bar.
Both are series, so unlike the interval values they change as the script moves through bars.
Example
session.date (variable)
Definition
The date of the session the current bar falls in.
Session values are series, not simple: this one changes as your script moves through bars.
Type
series string
Example
session.isfirst (variable)
Definition
True on the first bar of a session.
This is the flag to reach for when something has to reset once per session. The cumulative delta function reads it for exactly that purpose, seeding its running total from zero rather than carrying the previous bar’s total forward.
Type
series bool
Example