Title here
Summary here
[[crossover]] is a conditional block evaluating two expressions, reference and comparison, on every candle.
It triggers when reference rises above comparison after being below or equal on the previous candle. In other words:
When the condition is met, control jumps to the block specified by next_block_id.
This implements a classic bullish crossover test, for example a fast moving average crossing above a slow one.
The block compares expressions evaluated on every candle.
A strategy can contain multiple [[crossover]] blocks.
[[crossover]]
id = "cross_ma"
reference = "ma_fast" # expression A
comparison = "ma_slow" # expression B
next_block_id = "next_block"| Parameter | Description |
|---|---|
idText Required | Unique identifier of the block. |
referenceExpression Required | Numeric expression that must cross above comparison. It can be a series, a calculation, or a fixed numeric value. |
comparisonExpression Required | Numeric expression compared with reference. It can be a series, a calculation, or a fixed numeric value. |
next_block_idText Conditional | Required when the [[crossover]] 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 controls the execution flow based on a bullish crossover.