Extreme Order Block Indicator: Blocks Behind 2x ATR Moves

Written by Dominic Walsh · Published · Last updated

Order block tools usually mark every opposing candle before a move. The extreme order block indicator asks for more: the move away has to clear a multiple of ATR before the candle behind it counts. Weak pushes get ignored, so the boxes that survive are the ones behind a genuine displacement.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 2: Bullish OB, Bearish OB
Alerts popup
Inputs 8

What the Extreme Order Block Indicator draws on the chart

Bullish OB puts a dodger blue arrow beneath the candle that preceded a strong upward break.

Bearish OB puts an orange red arrow above the candle that preceded a strong downward break.

A rectangle covers each confirmed block and extends to the right so you can see when price returns to it.

Boxes disappear once the active limit fills, keeping the newest blocks visible.

  • Bullish OB: arrow, dodger blue, width 2, arrow code 233
  • Bearish OB: arrow, orange red, width 2, arrow code 234
Extreme order block indicator on EURUSD H1 with ATR-filtered blocks boxed and arrowed
Extreme order block indicator on EURUSD H1 with ATR-filtered blocks boxed and arrowed

How the Extreme Order Block Indicator calculates its values

Sizing the break against volatility

Each bar the code reads atr from iATR over `InpATRPeriod`, then measures bodyMove as close[i] – close[i+1]. absMove holds the size of that step. Comparing absMove against a multiple of ATR is what makes the filter portable: the same setting behaves sensibly on a quiet pair and a fast one, because the yardstick moves with the market.

Deciding the direction

bullBreak holds when bodyMove is positive and bearBreak when it is negative. Direction comes from the close-to-close step rather than the candle body, so a bar that opens low and closes high still registers as an upward break even if its own body is small.

Walking back for the opposing candle

An order block is the last candle that went the other way. The code sets lookback as MathMin(20, rates_total – i – 2) and steps back through idx = i + k. For a bullish break it wants bear_c, where close[idx] sits below open[idx]. For a bearish break it wants bull_c. That candle becomes the block, and the arrow lands 10 points clear of the signal bar.

How to read the signals

An arrow marks the break bar. The block itself sits behind it, which is where the rectangle goes.

Boxes price has not returned to are the untested ones.

A box that price cuts straight through told you something too: the level did not hold.

Raising the multiplier thins the chart quickly, because ATR-sized moves are common and 2x moves are not.

Alert channels in this build: popup, one message per closed bar.

This build carries one channel, a terminal popup, under `InpAlertOnNew` which ships `true`. It speaks when a new block is confirmed rather than when price returns to one, and the bar guard limits it to a single message per closed bar.

Every Extreme Order Block Indicator input

Core settings

Setting What it does Default
InpATRPeriod ATR period. Bars in the volatility yardstick, default `14`. Shorten it and the filter reacts to the current session rather than the day. 14
InpStrengthMult Strong-break multiplier (close move > N*ATR). How many ATRs the close move must cover, default `2.0`. This is the main dial: 1.5 gives many more blocks, 3.0 leaves only the sharpest. 2.0
InpMaxBoxes Max active order-block rectangles. How many rectangles stay on the chart, default `30`. Raise it on slower charts where blocks stay relevant longer. 30
InpBoxExtendBars Extend rectangle this many bars to the right. How far each box reaches to the right, default `40` bars. 40
InpObjPrefix Object name prefix. Names every rectangle, default `”XOB_”`. Change it only when another tool writes objects under the same prefix. XOB_

Display settings

Setting What it does Default
InpBullColor (see inputs panel) dodger blue
InpBearColor (see inputs panel) orange red

Alert settings

Setting What it does Default
InpAlertOnNew Alert when new OB confirmed. on
Extreme order block indicator inputs: InpATRPeriod, InpStrengthMult and InpMaxBoxes
Extreme order block indicator inputs: InpATRPeriod, InpStrengthMult and InpMaxBoxes

Settings that fit your chart

An ATR-scaled filter travels well, so the majors, gold and indices all work. EURUSD on H1 is the reference chart, where a 2.0 multiple leaves a handful of blocks a week. On M5 the filter still applies but blocks form and break faster than the 40-bar extension covers. On H4 and daily each surviving block carries more weight and the 30-box ceiling rarely fills.

When the Extreme Order Block Indicator fails

A large ATR-sized move can come from one news candle. The filter measures size, never cause, so it marks the block behind a spike as readily as one behind real accumulation.

The search for the opposing candle stops after 20 bars. A displacement that began further back leaves the tool pointing at the wrong candle.

Blocks expire on count rather than on being tested, so a level that mattered three weeks later may already have dropped off the chart.

Copy the compiled Extreme Order Block Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Background reading on the method behind the Extreme Order Block Indicator: Central limit order book on Wikipedia, Stockcharts Bullish Percent Index at StockCharts ChartSchool.

Download the Extreme Order Block Indicator for MT4 and MT5

The zip holds the compiled Extreme Order Block Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does InpStrengthMult at 2.0 actually require?

That the close-to-close move on the break bar covers more than twice the current ATR. The code compares absMove against `InpStrengthMult` times atr. Most bars fail that easily, which is the point. Drop it to 1.5 and blocks appear several times a day; raise it to 3.0 and you may see one a week on H1.

Which candle becomes the Bullish OB?

The last one that closed lower than it opened before the upward break. The code walks back up to 20 bars checking for bear_c, meaning close[idx] below open[idx]. That candle is where sellers were last active before price ran up, which is the standard order block definition.

Why does the arrow sit on a different bar from the rectangle?

They mark two different things. The arrow lands on the break bar, the bar whose move passed the ATR test. The rectangle covers the order block candle, which sits earlier in time. Reading left from an arrow to its box shows you the sequence the tool detected.

Does InpMaxBoxes remove blocks that are still valid?

It can. The limit is a count, not a judgement: once 30 blocks exist, the oldest drops as a new one appears. On H1 that usually covers a couple of weeks. If you work with older levels, raise it, and accept a busier chart in exchange.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Extreme Order Block Indicator as one input. Always backtest before trading live.

Category: this is part of our Smart Money collection. Also, truly, browse more Smart Money for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment