Your Order Block Looks Perfect. Can Your EA Actually Trade It?

Your Order Block Looks Perfect. Can Your EA Actually Trade It?

5 November 2026, 15:56
Lee Kai Lun
0
6

Imagine two traders staring at the same XAUUSD chart.

One sees a beautiful order block. The other sees a random candle with excellent public relations. Both draw a rectangle. Both are certain. And neither has yet answered the important question: could an Expert Advisor identify that exact rectangle before the price reacted?

Smart Money Concepts (SMC) can be a useful vocabulary for describing price structure. But labels such as order block, liquidity sweep, fair value gap, and break of structure do not automatically become trading rules. If you want to test one in MetaTrader 5, the attractive annotation has to survive a rather unfashionable examination: precise definitions, timestamps, costs, and every losing example.

The rectangle is not the strategy

An order block is often described as a candle or zone preceding a strong directional move. That sounds straightforward until two traders disagree about which candle counts, whether the wick belongs inside the zone, and when the zone stops being valid.

A price chart can show where price moved. It generally cannot tell you which institution placed a specific order or prove the intentions of unseen market participants. You can test a pattern without pretending to have a private telephone line to a bank's trading desk.

For an EA, write down what you mean. For example: "The zone is the full high-to-low range of the last bearish completed candle before a bullish displacement that closes above a previously confirmed swing high." That is only an illustrative definition, not a universal SMC standard. But it is at least something a programmer can translate into conditions.

Now define the awkward details: how strong is the displacement? Which swing high? How many candles may pass before entry? Can the zone be revisited twice? Does a one-point breach invalidate it? Without answers, the rule is not finished.

A liquidity sweep: nice story, difficult timestamp

Suppose a completed candle pushes above a known swing high, then closes back below it. A trader might call this a liquidity sweep. Fine. But when was the swing high actually known?

Here is a purely hypothetical test rule:

  1. Confirm a swing high only after two subsequent candles have closed, with the candidate high exceeding the highs of the two completed candles on each side.
  2. Wait for a later completed candle to trade above that confirmed high and close back below it.
  3. Consider a short entry only if the following completed candle closes below the sweep candle's low.
  4. Cancel the setup if that confirmation does not arrive on the very next candle. Set a stop, exit and position-risk rule before running the test.

Nothing here demonstrates a profitable edge. It demonstrates something more basic: two testers should be able to count the same signals. Notice the two-candle confirmation delay. If the backtest draws a swing high at the original candle but trades as if that high was known immediately, it is borrowing information from the future. The market does not offer that service.

A fair value gap is not an unpaid invoice

A common fair value gap (FVG) definition uses three candles and identifies a non-overlapping price interval between the first and third candles. Traders may watch for a later retracement into the interval.

But the market does not owe every gap a fill. Your test must specify the candle direction, whether wicks or bodies count, minimum gap size, timeframe, expiry, and what constitutes a valid touch or entry.

An indicator that draws historical gaps beautifully is not necessarily an EA that can execute them fairly. The drawing can be correct while the entry assumption is impossible.

The MT5 test that matters

Once the pattern is defined, evaluate it like a trading system rather than a gallery of successful screenshots.

First, use only information available at the decision time. On a live bar, highs and lows can still change; a completed-candle rule should not quietly act on an unfinished candle. Check whether an indicator repaints or backfills markings, and whether the EA uses buffer values that were actually available then.

Second, count every eligible setup. The dull Tuesday losses belong in the dataset alongside the gorgeous Friday reversal. Do not move a zone after seeing where price bounced.

Third, include spread, commission, slippage assumptions, symbol contract specifications, and realistic order handling. A perfect touch on a historical candle is not a promise of an executable fill. Use appropriate MT5 Strategy Tester settings and then investigate the difference between historical simulation and demo execution.

Fourth, separate the period used to design rules from a later, untouched evaluation period. If you tune your order-block width twenty times on the evaluation data, that period is no longer an independent examination. It has become your accomplice.

Finally, measure trade count, average win and loss, drawdown, losing streaks, and sensitivity to modest changes in parameters. A 75% win rate can still lose money if the losing trades are sufficiently large. The headline number is not the entire report.

A small example of the cost problem

Consider a hypothetical setup with a gross average winning trade of 12 points, a gross average losing trade of 18 points, and a 60% win rate. Before costs, its average outcome is:

0.60 × 12 − 0.40 × 18 = 0 points per trade.

It breaks even before spread, commissions and slippage. Add any positive average trading cost and its expectation turns negative. This is not a measured SMC result; it is arithmetic showing why "more wins than losses" is not proof of a workable strategy.

And for XAUUSD, remember that points, ticks, dollars and lot exposure depend on the symbol specification. Never copy a numerical stop distance from a screenshot without checking what it means on your broker's instrument.

What can an indicator honestly tell you?

An indicator can highlight a rule-defined structure, flag a potential sweep, or mark a gap. That can make analysis more consistent. It cannot establish that a bank caused the move, guarantee the zone will hold, or make a vague setup profitable by decorating it with more labels.

The best question to ask of any SMC indicator is not "Does it find amazing setups?" It is "Could I reconstruct the exact same signals, at the exact same time, from the same data, without seeing the future?"

If the answer is yes, you have a testable hypothesis. That is progress. If the answer is no, you may have a very attractive charting assistant—but not yet a repeatable trading system.

The market is under no obligation to respect your rectangle. Your test should be equally unsentimental.

This article is educational, not trading advice. Forex, gold, CFDs and automated strategies involve substantial risk, and no chart pattern guarantees profit.