Or

[[or]] is a conditional block that groups multiple existing conditional blocks.

On each candle, it tests the identifiers listed in condition_ids 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"
condition_ids = ["cond1", "cond2"]
next_block_id = "next_step"

Logical Nesting and Transitions

Blocks referenced in the condition_ids 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 itself is used as a child of another logical block, [[and]] or [[or]], its own next_block_id must also be omitted. If it is used as a direct child of a [[route]] block, it must define next_block_id instead, because [[route]] uses the selected child’s destination.

Block parameters

ParameterDescription
id
 Text
 Required
Unique identifier of the block.
condition_ids
 Array
 Required
Identifiers of the conditional blocks to evaluate. These IDs must exist in the strategy and are tested sequentially. Use condition_ids to declare the block’s logical children.
next_block_id
 Text
 Conditional
Identifier of the next block to execute as soon as a child condition is validated and the [[or]] block is validated. Must be omitted when this block is itself used as a child of an [[and]] or [[or]] block. Must be defined when this block is used as a direct child of a [[route]] block, because [[route]] follows the selected child’s next_block_id.

This block does not produce any output variable; it only combines multiple conditions with a logical OR.