Trading robot · MT5

Apex Breakout

by sbrakni

This Expert Advisor for MetaTrader 5 offers two distinct trading modes: Donchian Channel breakouts for trend following and session range breakouts for daytrading.

High risk

GitHub stars2
Forks1
Last update6 weeks ago11 Aug 2026
LicenceNone stated

Overview

The Donchian mode utilizes high/low channel breaks filtered by an Exponential Moving Average, while the session mode targets breakouts from defined UTC time ranges. It features a comprehensive risk management engine including ATR-based stop losses, trailing stops, and break-even logic. The included recovery module provides martingale-style lot scaling via multipliers or target-based sizing to recoup losses. It also implements a daily loss circuit breaker and an interactive dashboard.

Details

Author

sbrakni on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout, Martingale

Markets

Forex, Gold, Indices

Timeframes

M15-H1, H4 and above

Risk profile

  • Uses martingale lot scaling: losses can grow fast

Input parameters

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

NameTypeDefaultDescription
InpModeENUM_STRATEGY_MODEMODE_DONCHIANStrategy mode
InpATRPeriodint14ATR period
InpSLxATRdouble2.5Stop loss (ATR multiple)
InpTPxATRdouble0.0Take profit (ATR multiple, 0 = off)
InpTrailxATRdouble0.0Trailing stop (ATR multiple, 0 = off)
InpBreakevenRdouble0.0Move SL to entry after +R (0 = off)
InpBEOffsetPointsint0Break-even offset (points)
InpMaxBarsInTradeint0Time exit after N bars (0 = off)
InpEntryChannelint24Entry channel period (bars)
InpExitChannelint12Exit channel period (bars)
InpTrendEMAPeriodint200Trend EMA filter (0 = off)
InpAllowReversebooltrueStop-and-reverse on opposite signal
Show all 40 inputs
NameTypeDefaultDescription
InpRangeStartUTCint0Range build start hour
InpRangeEndUTCint7Range build end hour
InpEntryCutoffUTCint12Last entry hour
InpForceCloseUTCint19Force-close hour
InpBufferATRdouble0.25Breakout buffer (ATR multiple)
InpMinRangeATRdouble0.0Min range width (ATR multiple, 0 = off)
InpMaxRangeATRdouble0.0Max range width (ATR multiple, 0 = off)
InpAutoGMTOffsetbooltrueAuto-detect broker GMT offset (live only)
InpServerUTCOffsetint2Manual broker GMT offset (hours, used in tester)
InpTradeMonbooltrueTrade on Monday
InpTradeTuebooltrueTrade on Tuesday
InpTradeWedbooltrueTrade on Wednesday
InpTradeThubooltrueTrade on Thursday
InpTradeFribooltrueTrade on Friday
InpRiskModeENUM_RISK_MODERISK_PERCENTPosition sizing mode
InpRiskPercentdouble1.0Risk per trade (% of equity)
InpFixedLotsdouble0.10Fixed lot size (if fixed mode)
InpMaxSpreadPointsdouble0Max spread to trade (points, 0 = off)
InpMaxDailyLossPctdouble0Max daily loss % - blocks new trades (0 = off)
InpFlattenOnDailyLossboolfalseAlso close open position on daily loss
InpAllowLongbooltrueAllow long trades
InpAllowShortbooltrueAllow short trades
InpRecoveryModeENUM_RECOVERY_MODERECOVERY_MULTIPLIERRecovery sizing mode
InpMartMultiplierdouble1.5Risk multiplier per consecutive loss
InpMartMaxStepsint3Max multiplier steps
InpRecoveryTargetRdouble2.0Assumed win (R) for recovery targeting
InpMaxRiskPerTradedouble3.0HARD cap on effective risk per trade (%)
InpReentryMaxint0Same-day re-entries after SL loss (0 = off)

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone sbrakni/MQL5-trading-bot-claude-experiment 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.
  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

Nyao Scalper

by elrizwiraswara
173 stars

Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT

MT5 Trading robot ScalpingTrend followingMartingale High risk
Updated 3 months ago BSD-3-Clause GitHub repository of Nyao Scalper

Prop Firm EA Fleet

by cgemise971
20 stars

Prop Firm EA Fleet is a collection of MetaTrader 5 robots designed for passing prop firm evaluations and managing funded accounts. The suite utilizes various strategies including market structure analysis, session range breakouts for London and New York sessions, and high-frequency scalping. It features strict risk man

MT5 Trading robot SMC / ICT / price actionBreakoutScalping High risk
Updated 9 months ago None stated GitHub repository of Prop Firm EA Fleet

Nolo Trading Bot

by festomanolo
4 stars

This expert advisor for MetaTrader 5 is a multi-strategy system that utilizes market regime detection to switch between trend following, range trading, and breakout modes. It incorporates a wide array of technical indicators, including Moving Averages, RSI, MACD, Ichimoku, and SuperTrend. The bot manages risk through v

MT5 Trading robot Trend followingMean reversionBreakout High risk
Updated 6 months ago MIT GitHub repository of Nolo Trading Bot

Breakout FVG Bot

by Covenantmondei
1 stars

This MetaTrader 5 expert advisor implements a breakout strategy combined with Fair Value Gap alignment, primarily optimized for Gold (XAUUSD). It enters trades based on momentum and price range breaks, utilizing ATR-based calculations for dynamic stop loss and take profit levels. The system includes comprehensive risk

MT5 Trading robot BreakoutSMC / ICT / price actionTrend following High risk
Updated 9 months ago None stated GitHub repository of Breakout FVG Bot

Accure Dynasty

by wilfredNJH
1 stars

This MetaTrader 5 expert advisor provides a framework for trade execution with a heavy emphasis on risk management and scheduling. It offers multiple methods for calculating trade volume and exits: manual points, percentage of account risk, and ATR-based calculations. The EA includes a partial profit-taking system and

MT5 Trading robot Trend followingBreakoutMartingale High risk
Updated 10 months ago None stated GitHub repository of Accure Dynasty

Gold Adaptive Multi Regime EA

by cdimabusinessent-byte
1 stars

This MetaTrader 5 expert advisor is designed for gold trading using an adaptive, modular architecture. It features a regime detector that switches between trend-following, mean reversion, and breakout strategies based on market conditions. The system utilizes exponential moving averages, ADX for trend strength, and RSI

MT5 Trading robot Trend followingMean reversionBreakout High risk
Updated 4 months ago None stated GitHub repository of Gold Adaptive Multi Regime 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