Title here
Summary here
[[crossunder]] is a conditional block evaluating two expressions, reference and comparison, on every candle.
It triggers when reference falls below comparison after being above or equal on the previous candle:
When the condition is met, control jumps to the block specified by next_block_id.
This implements a classic bearish crossover, for example a fast moving average crossing below a slow one.
The block compares expressions evaluated on every candle.
A strategy can contain multiple [[crossunder]] blocks.
[[crossunder]]
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 below 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 [[crossunder]] 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 bearish crossover.