Or
[[or]] is a conditional block that groups multiple existing conditional blocks.
On each candle, it tests the identifiers listed in conditions in the given order.
As soon as at least one referenced block validates, the [[or]] block itself validates and execution continues to the block referenced by its own next_block_id.
If none of the referenced blocks validates, the [[or]] block is not validated on that candle and is evaluated again on the next one.
Block declaration
A strategy can contain multiple [[or]] blocks.
Example
[[or]]
id = "or_condition"
conditions = ["cond1", "cond2"]
next_block_id = "next_step"Logical Nesting and Transitions
Blocks referenced in the conditions key are logical children of the [[or]] block. They are evaluated in the declared order. As soon as one child validates, the [[or]] block stops, validates on that candle, and then follows its own next_block_id when it is used on its own.
When a conditional block is used as a child of [[or]], it must not define next_block_id. This applies to all logical children, including [[wait]], [[and]], and another [[or]] when they are nested inside [[or]].
If the [[or]] block is itself used as a child of another logical block, [[and]] or [[or]], its own next_block_id must also be omitted. In that case, the transition is fully controlled by the parent block.
Block parameters
| Parameter | Description |
|---|---|
idText Required | Unique identifier of the block. |
conditionsArray Required | Identifiers of the conditional blocks to evaluate. These IDs must exist in the strategy and are tested sequentially. |
next_block_idText Conditional | Required when the [[or]] block is used on its own. Must be omitted when it is used as a child of an [[and]] or [[or]] block. |
This block does not produce any output variable; it only combines multiple conditions with a logical OR.