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
Nothing converts time into another type.
Clock
| time.epoch | seconds since 1970 (UTC) | EPOCH_SECONDS | when did it happen |
|---|---|---|---|
| time.bar | a bar index on the chart | BAR_INDEX | how many bars ago |
| time.duration | a span in seconds | DURATION_SECONDS | how 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.