A candle only becomes an order block if something happened after it. The live order block indicator applies that literally: it finds the candidate, then looks forward across several bars to see whether a real impulse followed. Blocks that were never followed by a move never appear, which keeps the chart down to the levels that earned their place.
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: Bull OB Marker, Bear OB Marker |
| Alerts | popup |
| Inputs | 11 |
What the Live Order Block Indicator draws on the chart
Bull OB Marker places a lime arrow below a confirmed bullish block candle.
Bear OB Marker places a red arrow above the bearish case.
A rectangle covers each live block and extends to the right so you can watch price return to it.
Two switches control the rectangles: one fills them, the other pushes them behind the candles.
- Bull OB Marker: arrow, lime, width 2, arrow code 233
- Bear OB Marker: arrow, red, width 2, arrow code 234

How the Live Order Block Indicator calculates its values
Measuring the impulse that follows
This build looks forward rather than back. impulse_high and impulse_low start at the neighbouring bar and then track the extremes across `ImpulseLookahead` bars. impulse_range holds the span they covered. Separately, net_move takes impulse_end_close minus impulse_start_close, which measures how far price actually travelled rather than how far it ranged.
Setting the bar with ATR
threshold takes `ImpulseAtrMult` times atr, with atr from iATR over `AtrPeriod`. Comparing net_move against that threshold is what separates a real displacement from a wide but directionless few bars. Using net movement rather than range matters: five bars that swing hard and end where they started do not confirm a block.
Identifying the block candle
down_candle holds when close[i] is under open[i] and up_candle when it is above. A bullish block wants a down candle followed by an upward impulse, and the bearish case inverts both. Markers sit a tenth of an ATR from the candle rather than a fixed point count, so the spacing scales with volatility. `MaxLiveBlocks` caps how many stay on the chart at `20`.
How to read the signals
A measured move confirmed every block on screen, so you see fewer of them than a simple order block tool would show.
The rectangle marks the candle, and the impulse that confirmed it sits to the right of the box.
Marker distance from the candle is a rough volatility gauge, since it scales with ATR.
Blocks drop off on count, so the ones remaining are the most recent rather than the most important.
Alert channels in this build: popup.
One channel runs here, a terminal popup under `EnableAlerts`. It ships `true` and speaks when a new live block confirms. Note that this build carries no once-per-bar guard, unlike most of the library, so a bar confirming two blocks can raise two messages.
Every Live Order Block Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
AtrPeriod |
ATR period. Bars in the volatility measure, default `14`. | 14 |
ImpulseAtrMult |
Impulse multiple of ATR. How many ATRs the net move must cover to confirm a block, default `1.5`. This is the main filter. | 1.5 |
ImpulseLookahead |
Bars of impulse after OB candle. How many bars the impulse may take, default `5`. Widen it to allow slower moves to still confirm a block. | 5 |
MaxLiveBlocks |
Maximum live order blocks. How many blocks stay drawn, default `20`. | 20 |
ExtendBars |
Extend right by N bars. How far each rectangle reaches to the right, default `60` bars. | 60 |
FillRectangles |
Fill OB rectangles. Off by default, leaving outlines. `BackRectangles` pushes the boxes behind the candles when you turn it on. | off |
BackRectangles |
Draw rectangles behind price. | off |
ObjPrefix |
Object name prefix. Names every rectangle, default `”LiveOB_”`. | LiveOB_ |
Display settings
| Setting | What it does | Default |
|---|---|---|
BullObColor |
(see inputs panel) | dodger blue |
BearObColor |
(see inputs panel) | orange red |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Alert on new live OB. | on |

Settings that fit your chart
An ATR-scaled confirmation transfers between instruments, so majors, metals and indices all suit it. EURUSD H1 is the reference chart, where a five-bar impulse covers most of a session move. On M5 the lookahead spans under half an hour and blocks confirm quickly. On H4 the same five bars is nearly a day, which suits swing traders watching a handful of levels.
When the Live Order Block Indicator fails
Confirmation costs time. A block cannot appear until the impulse bars have printed, so you learn about a level several bars after the candle formed.
Net move ignores the path. Five bars that grind steadily and five that spike and retrace can produce the same number, though they mean different things.
The 20-block ceiling drops older levels regardless of whether price ever tested them.
Copy the compiled Live 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 Live Order Block Indicator: Order (exchange) on Wikipedia, Three Line Break Charts at StockCharts ChartSchool.
Download the Live Order Block Indicator for MT4 and MT5
The zip holds the compiled Live 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
What does ImpulseAtrMult at 1.5 require?
That the net move across the following bars covers more than one and a half times the current ATR. The code compares net_move against `ImpulseAtrMult` times atr. Below that, the candidate never becomes a block. Lower it to 1.0 for more blocks of lower quality, or raise it toward 2.5 for only the sharpest displacements.
Why does ImpulseAtrMult test net move instead of the bar range?
Because range can lie. Five bars that swing violently and finish where they began produce a large impulse_range but no displacement at all. net_move takes the closing price at each end of the window, so only bars that actually went somewhere confirm a block.
How long until a Bull OB Marker appears?
As long as `ImpulseLookahead` takes, which is `5` bars by default. The code cannot confirm the candle until the move after it has printed. That delay is the price of the filter, and it is why this build shows fewer blocks than tools marking every opposing candle.
Does EnableAlerts limit messages to one per bar?
No, and this is worth knowing. The facts for this build show no once-per-bar guard, unlike most of the library. If a single bar confirms more than one block, you can get more than one popup. Turn it off if that becomes noisy on a fast chart.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Live Order Block Indicator as one input. Always backtest before trading live.
Category: this is part of our Smart Money collection. Also, 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 Order (exchange) on Wikipedia.
- Additional market context is at Three Line Break Charts at StockCharts ChartSchool.
