Framework & template · MT5

ProfitRobots MQL5 Template

by sibvic

This is a modular MetaTrader 5 expert advisor framework designed to accelerate the development of custom trading strategies.

High risk

GitHub stars234
Forks73
Last update2 months ago1 Jul 2026
LicenceMIT
Latest release2025-1010 months ago

Overview

ProfitRobots MQL5 Template provides a standardized base that includes position management, risk controls, and multi-symbol support. The template features configurable entry and exit logic, integrated stop loss and take profit settings, and optional martingale lot scaling. It also includes utility functions to facilitate the porting of strategies from PineScript. Trading can be restricted by time ranges, specific symbols, and position caps.

Details

Author

sibvic on GitHub

Type

Framework & template

Platform

MetaTrader 5 (MQL5)

Strategy

Martingale

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

  • Uses martingale lot scaling: losses can grow fast

Input parameters

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

NameTypeDefaultDescription
GeneralSectionstringGeneral
symbolsstringSymbols to trade. Separated by ","
allow_tradingbooltrueAllow trading
BTCAccountboolfalseIs BTC Account?
entry_logicTradingModeTradingModeOnBarCloseEntry type
exit_logicTradingModeTradingModeOnBarCloseExit type
trading_sideTradingDirectionBothSidesWhat trades should be taken
lots_valuedouble0.1Position size
lots_typePositionSizeTypePositionSizeContractPosition size type
slippage_pointsint3Slippage, in points
close_on_oppositebooltrueClose on opposite
SLSectionstringStop loss/TakeProfit
Show all 40 inputs
NameTypeDefaultDescription
stop_loss_typeStopLossTypeSLPipsStop loss type
stop_loss_valuedouble10Stop loss value
trailing_typeTrailingTypeTrailingDontUseUse trailing
trailing_startdouble0Min distance to order to activate the trailing
trailing_stepdouble10Trailing step
NetStopSectionstringNet stop
net_stop_loss_typeStopLimitTypeStopLimitDoNotUseNet stop loss type
net_stop_loss_valuedouble10Net stop loss value
take_profit_typeTakeProfitTypeTPPipsTake profit type
take_profit_valuedouble10Take profit value
take_profit_atr_multiplicatordouble1.0Take profit ATR Multiplicator
NetTakeProfitSectionstringNet Take Profit
net_take_profit_typeStopLimitTypeStopLimitDoNotUseNet take profit type
net_take_profit_valuedouble10Net take profit value
PositionCapSectionstringPosition cap
use_position_capbooltrueUse position cap?
max_positionsint2Max positions
MartingaleSectionstringMartingale type
martingale_typeMartingaleTypeMartingaleDoNotUseMartingale type
martingale_lot_sizing_typeMartingaleLotSizingTypeMartingaleLotSizingNoMartingale lot sizing type
martingale_lot_valuedouble1.5Matringale lot sizing value
martingale_stepdouble50Open matringale position step
max_longsint5Max long positions
max_shortsint5Max short positions
OtherSectionstringOther
magic_numberint42Magic number
logic_directionPositionDirectionDirectLogicLogic type
TradingTimeSectionstringIn hhmm. You can put several ranges separated by ,Trading time

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone sibvic/mq5-templates 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

36 stars

This repository contains the MQL source code used by Forex Strategy Builder Professional to export automated trading strategies to MetaTrader 4 and MetaTrader 5. It serves as a standardized template for executing technical strategies generated by the software, handling order execution and trade management. The EA inclu

MT4MT5 Framework & template Multi-strategyMartingale High risk
Updated 4 years ago None stated GitHub repository of FSB Pro Expert Advisor
2 stars

This MetaTrader 5 framework provides a modular library for technical analysis, including candle pattern detection, support and resistance levels, and Fibonacci calculations. The repository includes an expert advisor that implements ZigZag-based wave analysis to identify market structure and chart patterns. It features

MT5 Framework & template SMC / ICT / price actionTrend followingMartingale High risk

CBMQL MQL5 Framework

by HarryWarre
2 stars

CBMQL is a development framework and build tool for MetaTrader 5 designed to modularize Expert Advisor code. Inspired by modern web development bundlers, it allows developers to break complex trading systems into reusable modules and bundle them into a single portable file. The system includes a Node.js-based environme

MT5 Framework & template Trend followingGridMartingale High risk

Multipair EA Template

by drdz9876
1 stars

This MetaTrader 5 expert advisor serves as a template for multi-pair trading systems using a dual Moving Average crossover strategy. It is designed to execute trades across multiple symbols from a single chart based on a user-defined list of currency pairs. The EA includes risk management tools such as a trailing stop,

MT5 Framework & template Indicator crossoverMartingaleMulti-strategy High risk
Updated 2 years ago GPL-3.0 GitHub repository of Multipair EA Template

This Expert Advisor framework for MetaTrader 4 provides a modular template for building custom trading strategies. It handles complex trade management tasks, including multi-symbol execution, margin-based position capping, and various lot-sizing algorithms such as risk percentage or fixed volume. Risk controls include

MT4 Framework & template Martingale High risk

Modular Trade System

by michaelwade
58 stars

This MetaTrader 4 template provides a modular framework for developing expert advisors. It organizes trading logic into decoupled components including signal engines, order management, and environment checking. The system uses an abstract controller class to handle data processing from multiple sources, such as MACD or

MT4 Framework & template MartingaleIndicator crossover High risk
Updated 6 years ago Apache-2.0 GitHub repository of Modular Trade System

More frameworks and templates

Need a broker for MT5?

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

Compare brokers