# forge.ta.order_blocks

```python
forge.ta.order_blocks(open_: ArrayLike, high: ArrayLike, low: ArrayLike, close: ArrayLike, swing_len: int = 5, internal_len: int = 2, internal: bool = True, swing: bool = True, show_last: int = 5, mitigation: str = 'wick', break_on: str = 'close') -> dict[str, np.ndarray | Zone]
```

The last opposite candle before each break of structure, kept until price goes through it.

Breaks are found as in market structure, for the swing and the internal level. For an upward
break the block is the last down candle at or before the lowest low between the broken swing
and the break bar; its box spans that candle's high and low. A downward break mirrors it.
``mitigation`` says whether a wick or only a close through the far edge removes a block, and
``bull_mitigated`` and ``bear_mitigated`` mark the bar. Each level keeps its five newest live
blocks per side as slots, newest first, and ``show_last`` of them are shown.

Since Forge API 1.
