How it is calculated
Swings and breaks as in structure. When a swing high breaks (BoS or CHoCH), take the lowest low between the swing and the break (the later on a tie); the last bearish candle at or before it is the bullish block, from its high to its low or, with Zone body, its body. Bearish blocks mirror this. A block ends on a close through its far side: a bullish one below its bottom.
Reference: ICT market structure, from public descriptions (#546)
How to read it
A block shows on the bar of the break that made it, never earlier, though its candle lies further back. The lines show the nearest active bullish block (the highest) and bearish one (the lowest); new and broken are 1 on the bar of the event. At most max_zones blocks per side are kept.
In a strategy
Buy the return to the block: with ob = ctx.ind("order_block", length=3, zone="body") a long limit at ob.bull_top and the stop below ob.bull_bottom, while the trend is up.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Swing bars each sidelength | Whole number | 3 | min 1, max 50 |
Break onbreak_on | Choice | "close" | Close, Wick |
Zonezone | Choice | "wick" | Full candle, Body only |
Zones kept per sidemax_zones | Whole number | 20 | min 1, max 500 |
What it draws
| Line | Drawn as |
|---|---|
| Bullish top | Steps |
| Bullish bottom | Steps |
| Bearish top | Steps |
| Bearish bottom | Steps |
Used in
No strategy template reads it yet.