MT5 Quant Lib provides a modular infrastructure for trade execution, multi-symbol management, and risk control. The included strategy enters trades based on RSI triggers and CCI trend confirmation, utilizing trendline analysis and ATR bands for market structure. Risk management features include percentage-based position sizing and ATR-calculated stop loss and take profit levels. The system supports advanced backtesting with data splitting and custom optimization criteria. It includes tools for trailing stops and breakeven management for runner positions.
Read from trend_following_ea.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
inp_lot_mode
LOT_MODE
LOT_MODE_PCT_RISK
Method used for position sizing (e.g., fixed lot, or % risk)
inp_lot_var
double
2
Lot value or risk percentage (depending on selected lot mode)
inp_sl_mode
SL_MODE
SL_ATR_MULTIPLE
Stop Loss method (e.g., ATR-based, fixed value, etc.)
inp_sl_var
double
1.5
SL parameter (e.g., ATR multiplier or fixed points)
inp_tp_mode
TP_MODE
TP_ATR_MULTIPLE
Take Profit method (e.g., ATR-based, fixed value, etc.)
inp_tp_var
double
1
TP parameter (e.g., ATR multiplier or fixed points)
inp_custom_criteria
CUSTOM_MAX_TYPE
CM_WIN_PERCENT
Custom performance metric to use in OnTester()
inp_opt_min_trades
int
0
Minimum trades required to validate backtest result
inp_data_split_method
MODE_SPLIT_DATA
NO_SPLIT
Method used to split data (e.g., train/test split)
inp_force_opt
int
1
Forces optimizer to call OnTester() even if not in training set
InpTrendlinePeriod
int
100
Lookback period for moving average used in trendline
InpTriggerPeriod
int
14
RSI period used to trigger entries
Show all 14 inputs
Name
Type
Default
Description
InpConformationPeriod
int
50
CCI period used for confirming trend direction
InpExitPeriod
int
5
Stochastic period used to signal exits
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone xMattC/mt5-quant-lib 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 framework provides MQL5 header files and example expert advisors designed to trade on non-time-based Range Bar charts within MetaTrader 5. It includes template robots for moving average crossovers and Super Trend strategies. The included code manages trade execution with configurable stop loss, take profit, break-
MT5Framework & templateIndicator crossoverTrend following
This collection provides educational templates for building MetaTrader 5 Expert Advisors. It includes demonstration robots that interface with indicators like MACD and Parabolic SAR using the iCustom function. The repository serves as a learning resource for structuring MQL5 code and handling trade execution. Each exam
MT5Framework & templateIndicator crossoverTrend following
This MetaTrader 5 framework provides a modular structure for developing and deploying automated strategies, specifically optimized for the Mini Índice Bovespa. It includes an example implementation of the Dunnigan setup, utilizing candle sequences and price levels for entries. The system manages trades with advanced co
Hedge Terminal is a specialized framework for MetaTrader 5 designed to facilitate hedging net positions and provide a structured API for managing expert advisors. The repository includes demonstration robots such as a moving average expert that operates across multiple timeframes. These examples show how to open trades
This MetaTrader 5 expert advisor acts as a modular architectural blueprint for developing complex algorithmic trading systems. It demonstrates a structured framework for separating user interface components, input configurations, and core execution logic into maintainable layers. While the repository provides placehold
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