Trading robot · MT5

SMC Order Block EA

by MrOwl1011

This dual-timeframe Expert Advisor for MetaTrader 5 automates Smart Money Concepts (SMC) trading.

GitHub stars16
Forks13
Last update2 days ago2 Oct 2026
LicenceCustom licence

Overview

The robot maps Order Blocks on a higher timeframe, waiting for a retest before seeking Change in State of Delivery (CISD) confirmation on a lower timeframe. It supports fixed lot sizes or percentage-based risk sizing, setting stops on the far side of blocks with adjustable risk-to-reward targets. Features include break-even adjustments, a trend filter, and capital protection limits like spread and daily loss guards. By default, the EA operates as a visual signal tool until trading execution is manually enabled via the on-chart panel.

Details

Author

MrOwl1011 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

SMC / ICT / price action

Markets

Forex, Gold, Indices

Timeframes

M1-M5, M15-H1

Risk Profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Topics

algo-trading-strategyexpert-advisorexpert-advisorsforexictmarket-structuremarket-structure-analysismetatrader5metatrader5-eametatrader5-mt5metatrader5-portablemql5mql5-automated-tradingmql5-marketmql5-strategymt5mt5-easmc

Input Parameters

Read from SMC_OrderBlock_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpSwingLengthint4Swing strength (bars each side)
InpSwingMinATRdouble0.5Min swing prominence (x ATR, 0 = off)
InpBOSModeENUM_SMC_BOS_MODESMC_BOS_CLOSEBOS confirmation mode
InpBOSBufferATRdouble0.10BOS close buffer (x ATR, buffer mode)
InpATRPeriodint14ATR period
InpDispATRMultdouble2.0Displacement ATR multiplier (net leg move)
InpDispCandleATRMultdouble0.8Min displacement strength (strongest body x ATR)
InpDispMinBodyPctdouble55.0Min candle body % of range
InpDispMinRelStrengthdouble1.5Min relative strength (body / avg body)
InpMaxOBToBOSBarsint8Max distance OB -> BOS (bars)
InpRejectLegViolationboolfalseReject if leg trades beyond OB far edge
InpTimeframePairENUM_SMC_TF_PAIRSMC_TFP_H1_M5Timeframes: HTF is the Order Block TF, CISD follows (panel default)
Show all 40 inputs
NameTypeDefaultDescription
InpEnableBullbooltrueDetect bullish OBs
InpEnableBearbooltrueDetect bearish OBs
InpExtendBarsint20OB extension (bars right of last bar)
InpMaxActivePerDirint10Max active OBs per direction
InpMaxAgeBarsint0Expire OB after N bars (0 = never)
InpOverlapModeENUM_SMC_OVERLAP_MODESMC_OVERLAP_SKIP_NEWOverlapping zones
InpOverlapPctdouble50.0Overlap threshold (% of smaller zone)
InpFVGModeENUM_SMC_FVG_MODESMC_FVG_CONFLUENCEFVG confirmation
InpFVGMinATRdouble0.05FVG minimum size (x ATR)
InpRetestEnabledbooltrueRetest detection
InpMitigationModeENUM_SMC_MITIGATION_MODESMC_MIT_MIDPOINTMitigation detection
InpInvalidationModeENUM_SMC_INVALIDATION_MODESMC_INV_CLOSE_BEYONDOB invalidation method
InpEnableCISDbooltrueEnable CISD
InpCISDSweepboolfalseLiquidity Sweep (panel default)
InpCISDConfirmbooltrueConfirmation Close (panel default)
InpCISDRetraceboolfalseRetracement / Entry (panel default)
InpCISDSwingLengthint3Liquidity swing strength (bars each side)
InpCISDSwingMinATRdouble0.3Liquidity swing min prominence (x ATR)
InpCISDSwingMaxAgeint150Swing stays liquidity for N bars (0 = always)
InpCISDSweepModeENUM_CISD_SWEEP_MODECISD_SWEEP_TRADE_THROUGHSweep definition
InpCISDSweepValidityint10Sweep can feed a later series for N bars
InpCISDLevelModeENUM_CISD_LEVEL_MODECISD_LEVEL_SERIES_RANGEConfirmation level
InpCISDMaxSeriesint12Max candles in the series
InpCISDMaxConfirmBarsint20Setup expires after N bars
InpCISDMaxRetraceBarsint50Retracement window (bars)
InpCISDScanDepthint1500CISD history scan depth (CISD bars)
InpCISDShowSDbooltrueShow standard deviation levels
InpCISDSDLevelsstring1.0,1.5,2.0,2.5Standard deviation levels

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone MrOwl1011/Smc_ZOB_CISD from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar Expert Advisors

EA Scalper XAUUSD

by francomascareloai
237 stars

EA Scalper XAUUSD is an automated trading research project for MetaTrader 5 focused on gold. It employs a multifaceted entry strategy using Smart Money Concepts like order blocks and liquidity sweeps, alongside moving average crossovers and Fibonacci zones. The EA includes a self-learning module designed to adapt to di

MT5 Trading robot SMC / ICT / price actionIndicator crossoverScalping High risk
Updated 3 months ago Custom licence GitHub repository of EA Scalper XAUUSD

Gold Trader EA

by mehdi-jahani
141 stars

Gold Trader EA is a multi-strategy expert advisor designed for trading XAUUSD on the MetaTrader 5 platform. It employs a fusion engine that combines up to 14 different technical analysis methods, including candlestick patterns, chart patterns, price action, and institutional levels. The system requires a user-defined n

MT5 Trading robot Multi-strategyTrend followingIndicator crossover
Updated 1 year ago None stated GitHub repository of Gold Trader EA
84 stars

This MetaTrader 5 expert advisor implements Smart Money Concepts including Order Blocks, Fair Value Gaps, and Break of Structure entries. It features an automated mode that combines multiple strategies alongside market regime detection using ADX or Efficiency Ratio to ensure trading in trending conditions. Risk managem

MT5 Trading robot SMC / ICT / price actionTrend followingMulti-strategy
Updated 2 months ago Apache-2.0 GitHub repository of SMC Unified Expert Advisor

My Trading Bot

by carlosrod723
78 stars

This MetaTrader 5 expert advisor implements a multi-strategy framework based on Smart Money Concepts. It identifies fractal-based liquidity sweeps, order blocks, and Fibonacci zones across multiple timeframes, typically using H4 for trend direction and M15 for execution. The EA includes an optional machine learning fil

MT5 Trading robot SMC / ICT / price actionAI / machine learningMulti-strategy
Updated 10 months ago MIT GitHub repository of My Trading Bot

ICT Gold EA

by darula-hpp
36 stars

This automated trading system for MetaTrader 5 focuses on spot Gold using Inner Circle Trader methodology. It identifies entries through order block detection, market structure analysis, and weekly opening price levels. The strategy is further filtered by dual moving averages and specific trading sessions, primarily Lo

MT5 Trading robot SMC / ICT / price actionIndicator crossoverTrend following
Updated 1 year ago None stated GitHub repository of ICT Gold EA

Fvg Gold EA

by foeed
34 stars

Fvg Gold EA is an automated trading robot for MetaTrader 5 designed specifically for the gold market. It utilizes institutional trading concepts by identifying high-probability Fair Value Gaps with Order Block confluence. The system employs a scoring algorithm to evaluate trade quality based on displacement, gap size,

MT5 Trading robot SMC / ICT / price actionIndicator crossover
Updated 2 weeks ago MIT GitHub repository of Fvg Gold EA

More trading robots

Need a Broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers