Back to builder reference
Value ref
swingPrice of a confirmed swing high/low — a bar whose extreme beats strength bars each side.
Confirmation is lagging by design: a swing at bar N is not visible
until bar N + strength, because the bars to its right have to print
first. That is what makes it lookahead-free, and it means the newest
readable swing is always at least strength bars old.
The comparison is strict, so a level matched exactly by a neighbouring bar
never forms a swing. offset counts back through confirmed swings
(0 = most recent); typed absence if that many have not been confirmed yet.
A comparison over that absent operand is UNKNOWN; the action boundary
takes no action.
Backing types
SwingValueRef
Required fields
FieldTypeDescription
swing_typereqenum: high, low-Optional fields
FieldTypeDescription
kindstring-offsetinteger-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.strengthinteger-symbolnullUnsupported on this value ref; only null is accepted.value_at_swinganyOf (3 variants)The value to read at the swing bar. The swing itself is always found on PRICE (the bar high for a swing high, the bar low for a swing low); this chooses what is read there. Omitted means the swing's own price. Any value ref is accepted, and its own resolution and symbol are honoured.Backing types
The IR ValueRef classes this builder field resolves to.
SwingValueRef