Order blocks

order_blockssmart_moneyForge API 1

The last opposite candle before a break of structure, kept until price trades back through it.

Inputs

NameTypeDefaultRange
swing_lenint52 to 100
internal_lenint21 to 99
internalbooltrue
swingbooltrue
show_lastint51 to 5
mitigationchoicewick
break_onchoiceclose

Outputs

NameTypeRequiredDescription
swing_bull_1zoneOptionalcolor theme.up/0.20, style area
swing_bull_2zoneOptionalcolor theme.up/0.20, style area
swing_bull_3zoneOptionalcolor theme.up/0.20, style area
swing_bull_4zoneOptionalcolor theme.up/0.20, style area
swing_bull_5zoneOptionalcolor theme.up/0.20, style area
swing_bear_1zoneOptionalcolor theme.down/0.20, style area
swing_bear_2zoneOptionalcolor theme.down/0.20, style area
swing_bear_3zoneOptionalcolor theme.down/0.20, style area
swing_bear_4zoneOptionalcolor theme.down/0.20, style area
swing_bear_5zoneOptionalcolor theme.down/0.20, style area
internal_bull_1zoneOptionalcolor theme.up/0.10, style area
internal_bull_2zoneOptionalcolor theme.up/0.10, style area
internal_bull_3zoneOptionalcolor theme.up/0.10, style area
internal_bull_4zoneOptionalcolor theme.up/0.10, style area
internal_bull_5zoneOptionalcolor theme.up/0.10, style area
internal_bear_1zoneOptionalcolor theme.down/0.10, style area
internal_bear_2zoneOptionalcolor theme.down/0.10, style area
internal_bear_3zoneOptionalcolor theme.down/0.10, style area
internal_bear_4zoneOptionalcolor theme.down/0.10, style area
internal_bear_5zoneOptionalcolor theme.down/0.10, style area
bull_mitigatedeventOptionalcolor theme.neutral, shape circle, style marker, where below_bar
bear_mitigatedeventOptionalcolor theme.neutral, shape circle, style marker, where below_bar
Warm-up
0 bars (0 at the defaults)
Repaints
No
Parity
None

Formula

Breaks are found as in market structure, with swing_len, internal_len and break_on. For an upward break, Forge takes the lowest low between the broken swing high and the break bar; the order block is the last down candle (close below open) at or before that low, back to the swing high. Its box spans that candle's high and low. A downward break mirrors it with the last up candle.

A block is shown from the break bar on. A bullish block is mitigated and removed when price trades below its low (mitigation wick) or closes below it (mitigation close); a bearish block mirrors it. bull_mitigated and bear_mitigated mark the bar.

Internal and swing blocks are tracked apart and turned on or off by internal and swing. Slot 1 is the newest unmitigated block of its kind; show_last slots are shown. Forge keeps the five newest unmitigated blocks per kind.