Loading…

Order Block Highlighter

An order block, in this indicator's definition, is the candle immediately before a strong directional bar that opposes that bar's own direction - the last down candle before a sharp rally, or the last up candle before a sharp drop. The idea is that resting orders were built while price sat on that candle, and the sudden move away from it is what those orders leaving the book looks like on a chart. "Strong" is measured against ATR(14), fixed at that period so the meaning of an impulsive bar is consistent regardless of which chart the indicator is dropped onto. The zone itself is drawn from the order-block candle's open and close, not its high and low - the wick is a single moment of excess, the body is the range the market actually accepted, and this indicator treats the body as the zone worth marking. A zone is only retired when a fully closed bar closes all the way through the far side of it - a wick poking in and out does not mitigate it. That is a stricter bar than most public versions of this idea use, and it means a zone can survive several visits before it is finally counted as used up. The zone then either turns grey and stops extending, or is deleted outright, depending on the mitigation setting. Notes and limitations - A zone only appears once the impulse candle itself has closed - this marks structure after the fact, it does not warn that an impulsive bar is forming while it is still in progress. - ATR(14) is fixed by design and is not an input, so "impulsive" means the same thing on every chart this indicator is used on; there is no way to change the ATR period without editing the source. - A same-direction candle immediately before the impulse is not treated as an order block under this definition and is simply skipped - the indicator only marks a genuinely opposing candle. - The indicator carries one calculation-only buffer holding the ATR value used for the impulse test; it is not plotted and exists so the file is a well-formed indicator with something a program could iCustom() if needed. - History is re-walked each tick to keep zone state correct after any reload, tracking only the zones still open while it does, so cost stays proportional to bars times active zones rather than bars squared.

Indicator · MT4 · v1.0 · Free

About Order Block Highlighter

Order Block Highlighter is an indicator for MetaTrader 4 based on ATR. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Atr multiple, Mitigated action and Alerts. MQL source code included.

Files in the download: OrderBlocks.ex4, OrderBlocks.mq4, OrderBlocks.txt.

Settings

SettingDefaultWhat it does
Atr multiple2.0Impulse threshold: bar range >= x * ATR14
Mitigated actionOB_ACTION_GREY_OUTOn full mitigation
AlertstrueAlert on a new order block (closed bar only)

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Smart Money (SMC / ICT) · Alerts · ATR · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria