The hidden order block indicator uses a looser threshold than most, and the name says so. A break counts when price travels `InpAtrMultiplier` times ATR within `InpBreakLookahead` bars of a candidate candle. The last opposite-coloured candle before that move becomes the block.
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 Marker, Bearish OB Marker |
| Alerts | popup, push notification, email, sound |
| Inputs | 13 |
What the Hidden Order Block Indicator draws on the chart
Bullish OB Marker places a lime arrow at the candle that became a demand block.
Bearish OB Marker places a red arrow for the supply case.
OBJ_RECTANGLE zones cover each block, in `InpBullColor` or `InpBearColor`.
Each zone extends `InpOBExtendBars` `30` bars forward from the candle.
- Bullish OB Marker: arrow, lime, width 2, arrow code 233
- Bearish OB Marker: arrow, red, width 2, arrow code 234

How the Hidden Order Block Indicator calculates its values
Picking the candidate
candIdx sits `InpBreakLookahead` `3` bars ahead of the bar being scanned. candBear and candBull record whether that candle closed down or up. Only an opposite-coloured candle can become a block.
Measuring the break
bestUp takes the highest close within the next three bars, and bestDown the lowest. strongUp needs bestUp to clear the candidate close by more than threshold. threshold takes `InpAtrMultiplier` `1.5` times ATR at `InpAtrPeriod` `14`.
Drawing the zone
A bullish block takes the candidate candle low and high as its band. The rectangle runs forward from that candle. `InpMaxOBObjects` `60` caps how many stay on the chart at once.
How to read the signals
The zone is the candle, not a derived level.
A three-bar window keeps the block close to the move that created it.
At 1.5 ATR the threshold is looser than a two-times rule, so blocks are more common.
The tool draws zones and stops. Nothing tracks a return to them.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`InpEnableAlerts` arrives on and `InpAlertPopup` handles delivery. `InpAlertPush`, `InpAlertEmail` and `InpAlertSound` all begin false. `InpSoundFile` picks the clip. Blocks confirm on closed bars, one message per bar.
Every Hidden Order Block Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpAtrPeriod |
ATR period. ATR length behind the break threshold, default `14`. | 14 |
InpAtrMultiplier |
Strong break threshold (xATR). Break size in ATR units, default `1.5`. | 1.5 |
InpBreakLookahead |
Bars after candle to check for break. Bars after the candidate in which the break must happen, default `3`. | 3 |
InpOBExtendBars |
Bars to extend OB rectangles forward. Bars a zone runs forward, default `30`. | 30 |
InpMaxOBObjects |
Maximum simultaneous OB rectangles. Cap on the rectangles kept, default `60`. | 60 |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpBullColor |
Demand zone colour, default dodger blue. | dodger blue |
InpBearColor |
Supply zone colour, default orange red. | orange red |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpEnableAlerts |
Master switch for the hidden block alerts, default `true`. | on |
InpAlertPopup |
Terminal dialog on a new block, default `true`. | on |
InpAlertPush |
Phone push on a new block, default `false`. | off |
InpAlertEmail |
Mail delivery on a new block, default `false`. | off |
InpAlertSound |
Sound playback on a new block, default `false`. | off |
InpSoundFile |
Wav clip for the block alert, default `alert.wav`. | alert.wav |

Settings that fit your chart
EURUSD H1 is the reference chart, and H1 suits a three-bar break window well. There a block forms and resolves within a few hours. On M5 ordinary noise clears 1.5 ATR during a busy session. On H4 the zones are wide and appear only a few times a month.
When the Hidden Order Block Indicator fails
A looser threshold means more blocks, and more of them mean nothing.
The break window is only three bars, so a slow but genuine move produces no block.
Nothing checks whether price returns, so the zones accumulate untested.
Copy the compiled Hidden 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 Hidden Order Block Indicator: Order flow trading on Wikipedia, ibwmfi (BWMFI) at the MQL5 Documentation.
Download the Hidden Order Block Indicator for MT4 and MT5
The zip holds the compiled Hidden 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.
FAQ
Why is InpAtrMultiplier set to 1.5?
That is what makes the tool hidden rather than extreme. A two-times threshold finds only the most obvious moves. At `1.5` the code catches smaller breaks too, which produces more blocks and asks more judgement from you.
What does InpBreakLookahead at 3 demand?
That the qualifying move happens within three bars of the candidate candle. A break arriving five bars later leaves no block. The short window keeps each zone tied to the move that created it.
Where exactly does the Bullish OB Marker zone sit?
On the last down candle before the up move, spanning that candle low to high. The marker arrow sits just below its low. That candle is the block, and its range is the level traders watch on a return.
How far forward does InpOBExtendBars draw?
Thirty bars past the candidate candle by default. That gives the zone somewhere to sit while price develops. Raise it if you want older blocks to stay visible, at the cost of a busier chart.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Hidden Order Block Indicator as one input. Always backtest before trading live.
Category: this is part of our Smart Money collection. Also, plainly, browse more Smart Money for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Order flow trading on Wikipedia.
- For wider market background, see ibwmfi (BWMFI) at the MQL5 Documentation.
