Skip to content
StatePath
All data types

time

Anything that answers “when” — a clock time, a position on the chart counted in bars, or…

What is it

Anything that answers “when” — a clock time, a position on the chart counted in bars, or a length of time. Kept apart from ordinary numbers so the two kinds of “when” never get mixed up.

Root family for every time-shaped value, with exactly three sub-paths: time.epoch (UTC timestamp, int64 seconds), time.bar (a chart bar position) and time.duration (a span in seconds). Deliberately distinct from num. Nothing is ever typed bare time: the two CLOCKS must not interconnect, so a port always declares its sub-path and the matching time_domain.

What is it a kind of

Who makes it

No tool makes this type directly.

Who takes it

How do I turn it into something else

Fromtime

Nothing converts time into another type.

Clock

time.epochseconds since 1970 (UTC)EPOCH_SECONDSwhen did it happen
time.bara bar index on the chartBAR_INDEXhow many bars ago
time.durationa span in secondsDURATION_SECONDShow long

These never mix: a bar index is not a time, and a duration is not a date. The validator refuses a wire between two clock domains, and nothing converts between them — compute the other one with a time tool.