Unmitigated Order Block Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

In ICT terms a block stays unmitigated until price comes back to it. The unmitigated order block indicator finds the opposite candle before a strong displacement, extends the block while price stays away, marks the first return, and then greys the block out so fresh and spent blocks look different.

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 Retest, Bearish OB Retest
Alerts popup, push notification, email, sound
Inputs 17

What the build actually draws

Colour-coded boxes and two marks.

`BullColor` `clrLimeGreen` outlines fresh demand.

`BearColor` `clrOrangeRed` outlines fresh supply.

`MitColor` `clrDimGray` shows spent blocks.

`Bullish OB Retest` prints lime with arrow 233.

`Bearish OB Retest` prints red with arrow 234.

  • Bullish OB Retest: arrow, lime, width 2, arrow code 233
  • Bearish OB Retest: arrow, red, width 2, arrow code 234
unmitigated order block indicator: Fresh and mitigated blocks with retests, EURUSD H1.
Fresh and mitigated blocks with retests, EURUSD H1.

What feeds each plot

Displacement

A bullish body of `DisplaceMult` `1.1` ranges or more counts. The build searches `ObSearchBack` `3` bars before it for the last down candle.

Block size

With `UseBodyZone` `false` the block covers the candle’s full range. Switched on, it covers the body only.

First return

The first bar whose low reaches the block, and stays within one block height below it, prints a retest and mitigates the block.

Reading it on a live chart

Green and orange red boxes are still fresh.

Grey boxes show blocks price has already touched.

Each block can mark only once.

`ExtendUnmitigated` stretches fresh boxes to now.

`ShowMitigated` keeps spent boxes visible.

`MaxBarsBack` `1500` limits the scan.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

First returns to a fresh block send a message naming the side. `EnableAlerts` holds them, and only the popup is on until you choose more.

Every Unmitigated Order Block Indicator input

Core settings

Setting What it does Default
AtrPeriod ATR period (displacement scale). Range window, `14`. 14
DisplaceMult Impulse body >= mult * ATR. Displacement body in ranges, `1.1`. 1.1
ObSearchBack Bars searched for the OB candle. Bars searched for the block candle, `3`. 3
ExtendUnmitigated Extend fresh blocks to current bar. Stretch fresh blocks to now, `true`. on
UseBodyZone Zone = candle body (else full range). Body-only blocks, `false`. off

Display settings

Setting What it does Default
MaxBarsBack History window to scan. History scanned, `1500`. 1500
ShowMitigated Draw mitigated (grey) blocks too. Keep spent blocks in grey, `true`. on
BullColor Fresh bullish (demand) zone. Fresh demand colour, `clrLimeGreen`. lime green
BearColor Fresh bearish (supply) zone. orange red
MitColor Mitigated zone. dim gray
ArrowOffsetPts Arrow offset (points). Mark gap in points, `10`. 10

Alert settings

Setting What it does Default
EnableAlerts Master alert switch, `true`. on
EnablePopup (see inputs panel) on
EnablePushNotify (see inputs panel) off
EnableEmail (see inputs panel) off
EnableSound (see inputs panel) off
SoundFile (see inputs panel) alert.wav
unmitigated order block indicator: Inputs panel, displacement settings above the colours.
Inputs panel, displacement settings above the colours.

Where to run it

Displacement candles appear a few times a day on hourly charts. EURUSD H1 is the reference chart. On M15 blocks pile up quickly. On H4 fresh blocks are rarer, and traders watch them more closely.

Where it breaks down

A first touch can slice straight through.

Full-range blocks can be wide.

Blocks far from price may never return.

Messages start as popups only.

Copy the compiled Unmitigated 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.

Download the Unmitigated Order Block Indicator for MT4 and MT5

The zip holds the compiled Unmitigated 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 makes a block unmitigated?

Price has not returned to it since it formed. The build keeps it coloured and extended until the first bar reaches it, then turns it grey.

When does Bullish OB Retest print?

On the first bar whose low enters the demand block, or dips at most one block height below it. That bar mitigates the block, so no second mark follows.

What does UseBodyZone change about each block?

The block’s height. Switched off, it covers the candle’s full range including wicks; switched on, it covers the body only, which gives tighter blocks and fewer first touches.

Why search ObSearchBack 3 bars for the block?

The last opposite candle usually sits right before the displacement. Three bars covers small pauses between the two without reaching back to an unrelated candle from an earlier move.

Are results guaranteed?

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

Category: this is part of our Smart Money collection. 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