What is an order block for?
When price breaks a high or a low and moves away fast, some traders think the orders that launched the move sit in the last opposite-colour candle just before it. That candle forms an โorder blockโ. The idea: if price comes back to the block, it may find support there. It is a reading hypothesis; Algo Signals sees no real orders, only candles.
How it is calculated
There are two indicators. The first (orderblock) is simple. The second (ob_retest) is stricter and only signals the return to the block.
- Order Block (orderblock): detect a structure break, i.e. a close beyond a local high or low (confirmed by default after 3 candles on each side). Then go back toward the broken high and keep the last opposite-colour candle: a bearish candle before a bullish break, a bullish one before a bearish break. The zone is its body, from open to close. It is invalidated as soon as a close goes to the other side (below the bottom for a bullish block, above the top for a bearish block). While valid, the state is bullish or bearish when the close sits in the zone, neutral otherwise.
- Order block retest (ob_retest): it needs an impulse candle whose body exceeds 1.2 times the ATR(14), preceded by an opposite-colour candle, after a liquidity sweep (the recent low goes under the lowest low of the previous 20 candles, mirrored for sells). Option: require a Fair Value Gap. The zone runs from the low of the opposite-colour candle to the middle of its body. Signal on the first return into the zone: the wick enters the half of the block, the close stays above the bottom of the zone and the candle is bullish (mirrored for sells). The zone expires after 100 candles or if a close goes through it.

How to read the signal in Algo Signals
With orderblock, the buy signal appears when price closes inside a still-valid bullish block; with ob_retest, it appears on the rejection candle, once per zone. The chart shows the zones: a rectangle whose height is that of the original candleโs body.

The settings
- Orderblock, pivot strength (left and right, 3 by default, from 1 to 20): larger, fewer breaks and blocks, but more pronounced.
- Ob_retest, impulse (impAtr, 1.2 by default, from 0.5 to 6): ATR multiple required for the body; larger, fewer zones.
- Ob_retest, sweep (sweepLook, 20 by default, from 5 to 200): number of reference candles for the swept low / high.
- Ob_retest, lifetime (maxAge, 100 by default, from 5 to 500) and required Fair Value Gap (fvgReq, 0 by default: 0 = no, 1 = yes).
The pitfalls
An order block is not a wall. Price can run through it without stopping, and an old zone that has already been revisited loses its interest. Another limit: a high is known only a few candles after it forms; on history, blocks can look better placed than they were live. Finally, zones multiply in a choppy market.

Key takeaways
- Order block = body of the last opposite-colour candle before a structure break; invalidated by a close on the other side.
- Orderblock gives a state while price closes in the zone; ob_retest requires sweep, impulse and rejection, and signals once per zone.
- These are hypotheses about candles, with no guarantee of a bounce.
- Combine them with the trend, a discount zone (premdisc) or a liquidity sweep, and always place a stop under the block.
๐ Lesson test
Log in to take this lessonโs test. Once you have passed all the tests, you will receive a certificate in your name.
Log inThese lessons are for understanding and are not investment advice. No method guarantees winning.