Live Order Blocks
Live Order Blocks is an indicator drawn over the price chart.
statesmart money
indicator "Live Order Blocks"pane: priceinput keep = 10state zones: list<Zone> = []for ob in order_blocks(new_only: true):zones.push(ob)zones = zones.filter(z => not z.mitigated).keep_last(keep)for z in zones:box 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)Sample data. Not a result. The real AlgoBarsX engine ran this exact script on made-up bars, and this replays what it drew and did. It shows no profit or loss, and it says nothing about how the script would do in a real market.
Replay of this script on 150 sample bars: 0 lines drawn.
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.