The accurate order block indicator uses the standard definition. An order block is the last candle of the opposite colour before an impulse move. The code finds the impulse by measuring its body against ATR, then reaches back one bar and marks that candle. Two arrow sets keep the block and the trigger separate.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD M15.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 4: Bull OB, Bear OB, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 9 |
What the Accurate Order Block Indicator draws on the chart
Bull OB puts a teal dot on the down candle that preceded a bullish impulse.
Bear OB puts a maroon dot on the up candle that preceded a bearish one.
Buy and Sell place lime and red arrows on the impulse bar itself.
`ArrowOffsetPoints` at `40` sets how far those arrows sit from the candle.
- Bull OB: arrow, teal, width 2, arrow code 119
- Bear OB: arrow, maroon, width 2, arrow code 119
- Buy: arrow, lime, width 4, arrow code 233
- Sell: arrow, red, width 4, arrow code 234

How the Accurate Order Block Indicator calculates its values
Sizing the impulse against ATR
atr reads iATR at `AtrPeriod` `14`, taken from the bar before the candidate so the impulse cannot inflate its own threshold. body takes the absolute difference between close and open. The candle qualifies when body exceeds atr times `ImpulseMultiplier`.
Requiring an opposite candle behind it
A bullish impulse needs the previous candle to have closed below its open. The bearish case needs the previous candle to have closed above its open. That one condition is what makes the mark an order block rather than just a large candle.
Marking the block and the trigger
BullOB writes the low of that earlier candle and BearOB writes its high. Buy and Sell then mark the impulse bar with the offset applied. So the dot sits on the block and the arrow sits on the move that created it.
How to read the signals
The teal or maroon dot marks the zone. The lime or red arrow marks what made it.
A block formed after a long run means less than one formed out of a range.
Raise `ImpulseMultiplier` when the chart fills with dots.
The tool marks blocks as they form and never tracks whether price returns to them.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` ships on with `EnablePopup` carrying the message. `EnablePushNotify`, `EnableEmail` and `EnableSound` are off by default, and `SoundFile` names the clip. The guard allows one message per closed bar.
Every Accurate Order Block Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
ImpulseMultiplier |
impulse body vs ATR. Impulse body size in ATR units, default `1.6`. Raise it toward 2.0 for fewer and larger blocks. | 1.6 |
AtrPeriod |
Lookback for the volatility reading behind the impulse test, default `14`. | 14 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowOffsetPoints |
Gap in points between an impulse arrow and its candle, default `40`. | 40 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
master toggle. Turns the four channels on as a group, default `true`. | on |
EnablePopup |
MT4 popup dialog. Raises the MT4 dialog when a block forms, default `true`. | on |
EnablePushNotify |
mobile MT4 push notification. Pushes the block through to your phone, default `false`. | off |
EnableEmail |
SMTP email (Tools > Options > Email). Sends the block by mail through the terminal, default `false`. | off |
EnableSound |
play sound file from MT4/Sounds/. Plays a Sounds folder file when a block forms, default `false`. | off |
SoundFile |
File the sound channel reaches for, default `alert.wav`. | alert.wav |

Settings that fit your chart
EURUSD M15 is the reference chart, and M15 through H1 matches how this methodology is normally traded. Lower than that and ordinary candles clear the ATR threshold too easily. On H4 and daily the blocks are rare and each one covers a wide price zone, which changes how you would use it.
When the Accurate Order Block Indicator fails
A block is only a candle until price returns to it, and this build does not track that return.
`ImpulseMultiplier` at `1.6` catches plenty of ordinary candles during a volatile session.
News candles produce large bodies with an opposite candle behind them, which satisfies the test without meaning much.
Copy the compiled Accurate 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 Accurate Order Block Indicator: Smart money index on Wikipedia, Percent B Money Flow at StockCharts ChartSchool.
Download the Accurate Order Block Indicator for MT4 and MT5
The zip holds the compiled Accurate 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
How large must a body be for ImpulseMultiplier?
A candle body at least 1.6 times the current ATR. On a chart where ATR reads 10 pips, the body must clear 16 pips. Raise it toward 2.0 when too many ordinary candles qualify, or lower it on a quiet instrument where nothing does.
Why does AtrPeriod read the previous bar?
So the impulse candle cannot raise the threshold it has to beat. The code takes iATR at index i plus one, which measures volatility up to the bar before. Reading ATR at the impulse bar itself would let a large candle partly excuse its own size.
Where exactly does the Bull OB dot land?
On the candle immediately before the bullish impulse, at that candle’s low. The code writes BullOB one index back rather than on the impulse bar. That earlier candle is the block itself, which is the level traders watch on a return.
Does the tool track price returning to a block?
No. It marks the block on the bar where the impulse confirms and stops there. Whether price comes back to that level later is left to you. Anything more would need the tool to hold state across bars, which this build deliberately avoids.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Accurate Order Block Indicator as one input. Always backtest before trading live.
Category: this is part of our Smart Money collection. Next, browse more Smart Money for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- The core method is documented in Smart money index on Wikipedia.
- Additional market context is at Percent B Money Flow at StockCharts ChartSchool.
