The htf order block indicator does its searching somewhere else. Every candle it examines is a daily one, even when your chart is hourly. The rectangles it draws therefore mark levels the whole market can see.
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 | 1: HTF_OB_Marker |
| Alerts | popup |
| Inputs | 7 |
What the Htf Order Block Indicator draws on the chart
Rectangles cover each block, dodger blue for bullish and crimson for bearish.
The single `HTF_OB_Marker` buffer draws nothing, so every mark is a chart object.
Boxes carry the `InpObjPrefix` `”HTFOB_”` naming so they clean up together.
No arrows appear anywhere on the chart.
- HTF_OB_Marker: hidden buffer, none

How the Htf Order Block Indicator calculates its values
Daily candles only
The scan walks `InpLookbackDays` `120` daily bars regardless of your chart timeframe. Working on daily data is what makes these blocks larger and rarer than an intraday equivalent.
Move size uses daily range
iATR runs on daily bars at `InpATRPeriod` `14`. A candle body has to beat `InpATRMult` `0.8` of that reading before it counts as an impulse worth tracing back.
The block is the opposite candle
From the impulse the code steps back to the nearest candle that closed the other way. Its open, close and high define the rectangle, which is the standard convention for this reading.
How to read the signals
Every box comes from daily data, so it holds for days rather than hours.
A box below price acts as a bullish reference and one above acts as bearish.
`InpATRMult` `0.8` is under one full range unit, so blocks are not rare.
Nothing tracks whether price later traded back into a box.
Alert channels in this build: popup, one message per closed bar.
One route ships here. `InpAlertOnNewOB` arrives true and raises a terminal message when a fresh block appears. There is no handset option, no mail option and no clip option in this build. Bars must close first.
Every Htf Order Block Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpLookbackDays |
D1 bars to scan for OBs. Daily bars the scan covers, default `120`. | 120 |
InpATRPeriod |
ATR period on D1. Daily bars in the range reading, default `14`. | 14 |
InpATRMult |
move size threshold (xATR of candle body). Range units the impulse body must beat, default `0.8`. | 0.8 |
InpObjPrefix |
chart-object prefix. Name prefix on every object it creates, default `”HTFOB_”`. | HTFOB_ |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpBullOBColor |
bullish OB color. Fill for a bullish block, default `clrDodgerBlue`. | dodger blue |
InpBearOBColor |
bearish OB color. Fill for a bearish block, default `clrCrimson`. | crimson |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpAlertOnNewOB |
alert on new OB. Terminal message when a fresh block appears, default `true`. | on |

Settings that fit your chart
The blocks come from daily data, so any chart below daily benefits. EURUSD H1 is the reference chart, where `InpLookbackDays` `120` reaches back about six months. On M5 the boxes dwarf the visible range.
When the Htf Order Block Indicator fails
A daily block can sit far from current price and never come into play.
`InpATRMult` `0.8` accepts a body under one range unit, which is generous.
Only one alert route exists, and it reports arrival rather than a touch.
Copy the compiled Htf 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 Htf Order Block Indicator for MT4 and MT5
The zip holds the compiled Htf 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 does InpLookbackDays 120 use daily bars?
Because the whole point is to find levels from a higher timeframe than your chart. A hundred and twenty daily candles is about six months, which covers most of the levels still in play.
What does InpATRMult 0.8 accept?
A daily candle body that reaches eight tenths of the fourteen-day range reading. That is under one full unit, so ordinary strong days qualify. Raise it above one if you want only decisive sessions.
Which candle does InpATRMult trace back to?
The nearest one before the impulse that closed the opposite way. Its own open, close and high set the box edges, which follows the usual convention for reading an origin candle.
What does the InpObjPrefix naming do?
It names every rectangle this tool creates, defaulting to `”HTFOB_”`. The prefix lets the code remove only its own drawings when you detach it, so your manual boxes stay untouched.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Htf Order Block Indicator as one input. Always backtest before trading live.
Category: this is part of our Smart Money collection. Then, 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 istddev (STDDEV) at the MQL5 Documentation.
