Blog / Strategy
Strategy

Market Maker Model: Buy and Sell Strategy Rules in MT5

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 Market Maker Model strategy is a pure price action, market-structure trading approach that automates the ICT Market Maker Buy Model and Sell Model in MetaTrader 5 without any technical indicators: no moving averages, oscillators, bands, ATR or volume. The Expert Advisor reads raw candles and looks for a four-stage sequence: a sideways consolidation, a one-directional "program" away from it, a liquidity sweep with a sharp reversal, and a pullback into a fair value gap.

In the market maker model ICT framework, price starts in an "original consolidation," moves away from it to build up liquidity (clusters of stop orders), then reverses back toward where it began. This EA turns that discretionary story into fixed rules, so each stage either qualifies or it does not. It is built for markets that alternate between ranges and directional legs, and it targets a return to the original range rather than a new trend.

As a learning tool, it suits traders who know basic candlestick structure and want the market maker model explained in precise, testable terms. Treat it as a strategy analysis exercise, not a shortcut to results.

How It Works

The EA evaluates closed bars only, so signals do not change while a candle is forming. For the sell side, the code flips the price data upside down, so both halves of the market maker buy and sell model ICT concept share identical logic. The steps below describe the buy model; reverse every condition for sells.

Stage 1: The Original Consolidation

Stage 2: The Sell Program

Stage 3: The Smart Money Reversal

Stage 4: Entry, Stop-Loss and Take-Profit

How the Market Maker Model Strategy Cancels a Setup

market maker model strategy
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
RangeBars 10 10 30 Number of candles in the original consolidation box. Values below 10 are raised to 10.
MaxRangeDrift 0.5 0.2 0.8 Largest allowed net move across the box, as a fraction of box height. Lower values require a flatter range.
SwingStrength 2 1 4 Candles needed on each side to confirm a swing high or low. Higher values pick out only larger swings.
MinLegs 2 2 4 Minimum lower highs and lower lows (higher highs and higher lows for sells) in the program leg.
MaxProgramBars 60 20 150 How far back, in bars, the EA searches for the original consolidation.
DisplacementBody 0.6 0.4 0.9 Minimum body-to-range ratio for the displacement candle (0.6 = body is at least 60% of the candle).
DisplacementLookback 4 2 12 Number of earlier candles whose bodies the displacement candle must exceed.
MinRR 2.0 2.0 5.0 Minimum reward-to-risk ratio needed to arm and enter a setup. Values below 2.0 are raised to 2.0.
SetupExpiryBars 12 3 40 How many bars a setup stays valid while waiting for price to return to the FVG.
StopBufferPoints 10 0 100 Extra distance, in points, placed beyond the sweep extreme for the stop-loss.
Lots 0.10 0.01 1.0 Fixed trade volume, adjusted to your broker's lot step and limits.

The MT5 version also has a Magic input (default 5150), the ID the EA uses to recognise its own positions.

market maker model strategy — MQL5 source code

Recommended Chart Settings

The EA was designed for EURUSD on the M15 (15-minute) timeframe. It reads only the chart it is attached to, so you can test it on any symbol and timeframe. Note that StopBufferPoints is measured in points: on 5-digit EURUSD, 10 points is 1 pip, but the same value means something very different on gold, indices or JPY pairs.

If you test the market maker model MT5 build elsewhere, expect different behaviour: higher timeframes tend to produce fewer setups, lower timeframes more noise. Results will also vary between ranging, trending and news-driven conditions.

How to Install on MetaTrader 5

The compiled file is MarketMakerModel.ex5. While running, the EA logs "armed," "skipped" and entry messages to the Experts tab so you can follow each decision.

What to Consider Before Using This EA

Strengths

Limitations

Note that institutional market maker trading strategies involve quoting bid and ask prices. The Market Maker Model strategy here is a retail chart pattern that only borrows the name.

Risk Management Tips

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