Value ref
trackedRunning highest or lowest value of source since the start of the run or since entry.
extreme chooses the maximum or the minimum and since the starting point.
With since: "start" (the default) it updates at the end of every bar, warm-up
included, so a rule deciding at the close of bar t sees the extreme through bar t-1; a
scheduled rule sees its frame bar included. With since: "entry" it is unset while
flat, resets when a position opens from flat (not on a scale-in or a partial exit; a
reversal opens from flat) and updates before decisions on each bar while invested, so a
rule sees the extreme through the current bar. Absent values of source are skipped,
and an unset value makes a comparison over it unknown. It keeps its state across a
paper session's restarts. since: "entry" is refused in a signal scan, as every
operation on the open position is.
Known gaps it inherits: a raw trailing ratchet built from it does not reset after it
fires, since: "entry" folds in the whole bar of a mid-bar scheduled fill, and the
reset runs only for the entry rule that filled. A since: "entry" value is refused
anywhere inside a gate: a gate is evaluated while flat as well as invested, so a value
that resets at entry cannot be kept correct there. Use since: "start", or put the
condition on an exit. It returns the unit of source.
Example, the highest high since entry, to place a trailing exit under:
{"kind": "tracked", "source": {"kind": "price", "field": "high"}, "extreme": "max",
"since": "entry"}
compared with close using <.
Backing types
TrackedValueRef
Required fields
Optional fields
Backing types
The IR ValueRef classes this builder field resolves to.