Live Order Blocks

Live Order Blocks is an indicator drawn over the price chart.

statesmart money

live-order-blocks.abx
1indicator "Live Order Blocks"
2pane: price
3
4input keep = 10
5
6state zones: list<Zone> = []
7
8for ob in order_blocks(new_only: true):
9zones.push(ob)
10zones = zones.filter(z => not z.mitigated).keep_last(keep)
11
12for z in zones:
13box id: z.id, from: (z.formed_bar, z.top), to: (bar.index, z.bottom), color: if z.bullish then green.fade(80) else red.fade(80)
What this script says

Live Order Blocks is an indicator drawn over the price chart.

You can change one input: keep (default 10).

It remembers zones from one bar to the next.

It calculates zones as zones.filter(z => not z.mitigated).keep_last(keep).

On each bar, it goes through each ob in the order blocks and adds ob to zones.

On each bar, it goes through each z in zones and draws a box.

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account