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.
Standardized MQL5 expert advisor starter template
Multi-symbol trading with configurable entry and exit logic
Flexible risk management with trailing stops and position caps
Built-in optional martingale lot scaling module
Compatibility helpers for PineScript strategy conversion
Read from EA_Base.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
GeneralSection
string
General
symbols
string
Symbols to trade. Separated by ","
allow_trading
bool
true
Allow trading
BTCAccount
bool
false
Is BTC Account?
entry_logic
TradingMode
TradingModeOnBarClose
Entry type
exit_logic
TradingMode
TradingModeOnBarClose
Exit type
trading_side
TradingDirection
BothSides
What trades should be taken
lots_value
double
0.1
Position size
lots_type
PositionSizeType
PositionSizeContract
Position size type
slippage_points
int
3
Slippage, in points
close_on_opposite
bool
true
Close on opposite
SLSection
string
Stop loss/TakeProfit
Show all 40 inputs
Name
Type
Default
Description
stop_loss_type
StopLossType
SLPips
Stop loss type
stop_loss_value
double
10
Stop loss value
trailing_type
TrailingType
TrailingDontUse
Use trailing
trailing_start
double
0
Min distance to order to activate the trailing
trailing_step
double
10
Trailing step
NetStopSection
string
Net stop
net_stop_loss_type
StopLimitType
StopLimitDoNotUse
Net stop loss type
net_stop_loss_value
double
10
Net stop loss value
take_profit_type
TakeProfitType
TPPips
Take profit type
take_profit_value
double
10
Take profit value
take_profit_atr_multiplicator
double
1.0
Take profit ATR Multiplicator
NetTakeProfitSection
string
Net Take Profit
net_take_profit_type
StopLimitType
StopLimitDoNotUse
Net take profit type
net_take_profit_value
double
10
Net take profit value
PositionCapSection
string
Position cap
use_position_cap
bool
true
Use position cap?
max_positions
int
2
Max positions
MartingaleSection
string
Martingale type
martingale_type
MartingaleType
MartingaleDoNotUse
Martingale type
martingale_lot_sizing_type
MartingaleLotSizingType
MartingaleLotSizingNo
Martingale lot sizing type
martingale_lot_value
double
1.5
Matringale lot sizing value
martingale_step
double
50
Open matringale position step
max_longs
int
5
Max long positions
max_shorts
int
5
Max short positions
OtherSection
string
Other
magic_number
int
42
Magic number
logic_direction
PositionDirection
DirectLogic
Logic type
TradingTimeSection
string
In hhmm. You can put several ranges separated by ,
Trading time
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone sibvic/mq5-templates from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
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
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
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
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,
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
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