Order Block Node

The Order Block node finds the candle a strong move left behind, keeps it until price comes back, and gives you the newest block's edges, midpoint and age. How a block forms, what uses it up, and how it differs from a fair value gap.

NodeBy AlgoLiftUpdated 6 min read
On this page 8What counts as an order blockWhen a block appears, and when it's used upExample: buy the pullback into a fresh blockSettingsOutputsUse something else whenWhen it doesn't behaveGoing further

Before a strong move there's usually a candle where the move was loaded: the last red bar before a rally, the last green one before a drop. Traders call it an order block and expect price to come back to it. The Order Block node finds every block once the move that made it is complete, remembers it until price uses it up, and tells you where the newest one is.

Takes
Nothing. It reads its series' candles
Gives
Whether price traded into a block, and the newest block's edges, midpoint, age and count
Reach for it
Entries on a return to a block, with the stop beyond it

What counts as an order block

A bullish block has two parts, a base and a move.

The base is the candle the move started from. With Base Is set to the last candle against the move (the default), it's the down-closing candle right before the move, or the run of them, up to Base Length candles. If the bar right before the move closed up, there's no bullish block there. Switch Base Is to the whole base before it and the base becomes the last Base Length candles, whatever they did, which is the supply-and-demand reading of the same idea.

The move is the Move Length bars after the base. From their highest high to their lowest low they have to cover at least Move Size times the ATR, and the last of them has to close above the base's high. Turn on Require a Gap and the move must also leave a fair value gap somewhere inside it. Bearish blocks are the mirror: an up-closing base, then a move down that closes below the base's low.

One detail is easy to miss and matters a lot: the ATR is read as of the base, not at the end of the move. Read at the current bar, a big move would raise the very bar it has to clear.

The zone is the whole base candle, wick to wick, by default. With Zone Covers set to body to the far wick, a bullish block runs from the top of the base's body down to its low, a thinner zone that price has to come further into.

When a block appears, and when it's used up

A block can't exist before its move is finished, so it appears when the last bar of the move closes: with Move Length 3, three bars after the base. Like every price-action value, your strategy reads it from the next bar on, and Bars Since Bull Block counts from the bar it appeared, not from the base candle.

From then on it waits for price. For a bullish block:

Used Up WhenThe block is gone after
Price trades into it (default)The first bar whose low reaches the block's top
Price reaches halfwayThe first bar whose low reaches its midpoint
A close beyond itThe first bar that closes below its bottom

Two limits retire blocks too. Blocks Tracked caps how many unused blocks each side remembers (five by default), and a new one past the cap pushes out the oldest. Maximum Age drops a block that many bars after it formed. Neither of those is price using the block, so neither fires Block Used Up.

Example: buy the pullback into a fresh block

You trade ES 5m and want to buy when price pulls back into the most recent bullish block while the trend is up, with the stop a point under the block.

Set Blocks Tracked to 1, so only the newest block counts, and Used Up When to a close beyond it, so the block survives the touch and dies when a bar closes through its bottom (which is also when the idea is wrong). Wire Inside Bull Block into a Logic AND, together with a Comparison checking that a Market Structure node's Trend is greater than 0, and send the AND into a long Entry.

For the stop, measure the Bracket Order's stop from a level: wire Newest Bull Block Bottom into the stop's level input and set the distance to 1 point. Because the block is still alive when the trade fills, that bottom belongs to the block you're buying. The level is read once, at the fill.

Settings

Base Is
Default The last candle against the move
The last candle that closed against the move, or the whole base before it whatever the candles did.
Base Length
Default 1
How many candles the base may cover. 1 is the single candle before the move.
Move Length
Default 3
How many bars after the base count as the move. The block appears when the last of them closes.
Move Size
Default 1.5 ATRs
How far the move has to travel, high to low, in ATRs measured at the base.
ATR Period
Default 14
The ATR the move is measured against, the same one an ATR node on this series shows.
Require a Gap
Default Off
Only count a move that left a fair value gap behind it. Fewer blocks, each with a visible imbalance.
Zone Covers
Default The whole candle
The whole base candle, or its body out to the far wick.
Used Up When
Default Price trades into it
Price trades into it, price reaches halfway, or a bar closes beyond it.
Blocks Tracked
Default 5
Unused blocks remembered per side, from 1 to 10. A new one past the limit pushes out the oldest.
Maximum Age
Default 0 (no limit)
Bars after forming before a block is dropped, used or not.

Outputs

Each output comes in a bullish and a bearish version.

Inside Bull / Bear Block
True or false
True for the bar after price traded into an unused block, the bar that used it up included.
Unused Bull / Bear Blocks
Number
How many blocks are still waiting for price.
Newest Block Top
Number
The top of the most recently formed unused block.
Newest Block Bottom
Number
Its bottom. For a bullish block, where a stop usually sits under.
Newest Block Midpoint
Number
Halfway through it, a common entry level.
Bars Since Block
Number
Bars since the newest block appeared, 0 on the bar it formed.
Block Used Up
True or false
True for the bar after price used a block up. An expiry or a push-out doesn't count.

Use something else when

You mean the gap a fast move left
A gap is the empty band between the first and third candles of a fast move; a block is the candle before the move. The gap node follows the nearest gap, this one the newest block.
The trend the block sits in
Its Trend output is the usual filter: buy bullish blocks only while it's above 0.

When it doesn't behave

My stop is nowhere near the block I bought

That's the default, Price trades into it, at work. The touch you're buying also used the block up, so when the trade fills, Newest Block Bottom already points at an older block, or at nothing. Switch Used Up When to halfway or to a close beyond it, so the block outlives the touch, as in the example.

It finds almost no blocks

Each condition thins the list: a Move Size too big for the timeframe, Require a Gap, and the default base rule, which needs a candle that closed against the move right before it. Lower Move Size first. The node's editor draws every block on a live chart and counts how many formed, so you can see the effect before you run anything.

A block I could see on the chart is gone

It was used up, aged out, or pushed out. Check Used Up When first, then Maximum Age, then Blocks Tracked: once the node holds its limit, every new block drops the oldest.

The builder won't let me wire it into a Crossover

Order Block keeps its own memory across the engine's monthly chunks of history, so a Crossover (or Since, Capture, a State Machine) can't read its history correctly, and the builder refuses rather than guess. Compare its levels with a Comparison, which is exact on every bar.

Going further

The editor has three presets to start from: Standard (the defaults), Body-Only (the body zone, used up at the midpoint) and Gap-Confirmed (Require a Gap, with Move Size 2.5). The Patterns section of the node panel carries the same three, plus an Order block retest composition that pairs Inside Bull Block with Market Structure's trend.

Move Size, Move Length and the used-up rule decide which blocks exist at all, and so what your backtest is testing. Pick them from the blocks you'd draw by hand, then leave them alone. Sweeping all three until the equity curve looks good is the fastest way to a strategy that only worked on the past.

Or ask the copilot