Skip to main content

Module rules

Module rules 

Source
Expand description

Evaluation of the strategy DSL (Operand / Condition) against the per-bar history. Operands resolve to a number (or None when an indicator is still warming up); conditions resolve to a boolean (false when any operand is missing). Cross conditions compare the current bar with the previous one.

Structs§

BarRow
One bar’s computed state: the bar plus every ready indicator’s value.
RuleState
Engine state the stateful conditions read.

Functions§

condition_lookback
How many bars before the current one a condition can reach.
eval_condition
Evaluate a condition at bar idx. Missing operands make a comparison false.
eval_operand
Evaluate an operand at bar idx, or None if it cannot be resolved.
operand_lookback
How many bars before the current one an operand can reach.