Blog / Strategy
Strategy

Displacement Order Block Retest

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Displacement Order Block Retest is a pure price-action expert advisor (EA) built around the Inner Circle Trader (ICT) concept of the "order block," and it trades in an anticipatory, limit-order style rather than chasing momentum. There are no traditional indicators anywhere in its logic — no moving averages, no RSI, no oscillators. Every decision is made from raw candle geometry: the location of swing highs and lows, the size of an impulsive candle relative to recent volatility, and the body of the candle that preceded the move.

The core idea comes from how institutional order flow is often described in ICT material. The theory suggests that large players accumulate positions inside the last opposing candle before a strong, structure-breaking move — that candle is called the order block. When price later returns ("retraces") into that zone, it is said to be filling resting institutional orders before the trend continues. This EA tries to anticipate that retrace by parking a limit order inside the block, so a fill comes with tight, structure-defined risk instead of entering late after the move has already extended.

As a learning tool, this strategy is best suited to traders who want to study market structure, displacement (impulsive expansion), and order-block mechanics in a rules-based, repeatable way. Because it waits for a clean break of structure followed by a controlled pullback, it is designed for trending or impulsive market conditions rather than tight, directionless ranges. It is an analytical framework for understanding how price-action concepts can be coded into objective conditions — not a shortcut to results.

How It Works

The strategy evaluates the chart once per newly closed bar and never acts on the still-forming candle. Each step below describes what the strategy signals, not what you will earn.

displacement order block MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
SwingLookback 12 5 40 Number of bars used to define the rolling swing high/low that structure must break.
AvgRangeBars 14 5 40 Number of bars used to compute the mean candle range (the volatility baseline).
DisplacementMult 1.8 1.0 4.0 Breakout candle range must be at least this multiple of the average range to count as displacement.
EntryDepth 0.50 0.0 1.0 Depth of the limit inside the block: 0 = proximal edge, 0.5 = midpoint, 1 = distal edge.
StopBufferPct 0.20 0.0 1.0 Extra stop buffer beyond the block's far edge, as a fraction of block height.
RiskReward 2.0 1.0 6.0 Fixed reward-to-risk ratio used to set the take-profit distance.
ExpiryBars 12 3 50 Number of bars after which an unfilled resting limit order is cancelled.
Lots 0.10 0.01 1.0 Fixed trade volume in lots.
displacement order block MT5 EA — MQL5 source code

Recommended Chart Settings

This strategy is symbol- and timeframe-agnostic in code, but its logic — break of structure followed by an order-block retrace — tends to be studied on intraday timeframes such as M15, M30, or H1, where displacement candles and structural shifts are frequent enough to generate setups. Liquid instruments like major forex pairs (for example EUR/USD or GBP/USD) or major indices are common testing grounds because their candle ranges are relatively consistent, which helps the volatility baseline behave predictably.

Because the EA uses a fixed lot size and a fixed reward-to-risk target, its behavior will vary considerably across symbols, sessions, and volatility regimes. There is no single "best" setting. Treat the defaults as a starting point for study, and remember that results will differ across different market conditions and brokers.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths. The strategy is fully rules-based, which makes it an excellent tool for learning how ICT concepts — displacement, break of structure, and order blocks — can be turned into objective, repeatable conditions. Its limit-entry approach means trades are entered at structure-defined prices with stops anchored to the block, giving a clear, asymmetric reward-to-risk framework. Refining the order block to the candle body (rather than the full wick range) produces a tighter zone and a more precise entry footprint.

Known limitations. Order-block theory is interpretive, and reducing it to fixed rules necessarily simplifies a discretionary concept. Not every structural break is followed by a clean retrace; price may continue without returning to the block, in which case the limit simply expires unfilled. The displacement filter helps screen weak breaks, but no filter is perfect, and false breaks still occur.

When it may underperform. In choppy, range-bound markets, swing extremes are repeatedly broken by small candles that do not represent genuine displacement, which can lead to setups that fail to follow through. During high-impact news, fast gaps may skip past a resting limit or fill it just before an adverse spike. Because the EA uses a fixed lot size, it does not adapt position size to changing volatility or account equity. None of these traits make the strategy "good" or "bad" — they are characteristics to study and account for.

Risk Management Tips

Sound risk management matters far more than any single entry technique. Consider these general principles as part of your education:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog