Back to builder reference
Value ref
anchorA field of a named anchor — a single bar captured earlier and then held.
The anchor is declared in the strategy's anchors (captured by
timestamp, bar index, or the first false-to-true flip of a condition);
referencing an anchor_id that is not declared fails at compile time.
Until the anchor actually fires the value is typed absence. A comparison
over that absent operand is UNKNOWN; the action boundary takes no action.
mid and range are derived from the captured bar's high and low.
Does not accept resolution.
Backing types
AnchorValueRef
Required fields
FieldTypeDescription
anchor_fieldreqenum: open, high, low, close, mid, range-anchor_idreqstring-Optional fields
FieldTypeDescription
kindstring-resolutionanyOf (2 variants)Optional higher-timeframe override for this value ref. Set it inside left/right refs such as {'kind': 'indicator', ..., 'resolution': '4h'} or {'kind': 'price', 'field': 'close', 'resolution': '4h'}. Do not put timeframe/source_timeframe on the parent condition. None = strategy timeframe.symbolanyOf (2 variants)Optional reference symbol this value ref reads from (e.g. 'SPY'). None = the traded/primary symbol. Mutually exclusive with resolution.Backing types
The IR ValueRef classes this builder field resolves to.
AnchorValueRef