Mql5 EA Framework includes a functional strategy that enters trades based on RSI levels and Moving Average crossovers. The system manages exits through automated stop loss, take profit, break-even adjustments, and trailing stops. Risk management is centralized, offering dynamic lot sizing based on account equity and a maximum drawdown threshold. The framework is designed for extensibility, allowing traders to swap signal providers or risk models while maintaining clean trade execution logic.
RSI and Moving Average crossover signal generation
Dynamic position sizing based on account risk percentage
Read from MyEA.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpMagicNumber
int
123456
Magic Number
InpTradeComment
string
MyEA v1.0
Trade Comment
InpRiskPercent
double
2.0
Risk Per Trade (%)
InpMaxDrawdown
double
20.0
Max Drawdown (%)
InpUseFixedLot
bool
false
Use Fixed Lot Size
InpFixedLot
double
0.1
Fixed Lot Size
InpStopLossPips
double
50.0
Stop Loss (pips)
InpTakeProfitPips
double
100.0
Take Profit (pips)
InpBreakEvenTrigger
double
30.0
Break-Even Trigger (pips)
InpBreakEvenOffset
double
5.0
Break-Even Offset (pips)
InpTrailingStart
double
40.0
Trailing Stop Start (pips)
InpTrailingStep
double
5.0
Trailing Stop Step (pips)
Show all 22 inputs
Name
Type
Default
Description
InpTrailingDistance
double
20.0
Trailing Distance (pips)
InpRsiPeriod
int
14
RSI Period
InpRsiOverbought
double
70.0
RSI Overbought Level
InpRsiOversold
double
30.0
RSI Oversold Level
InpMaFastPeriod
int
10
Fast MA Period
InpMaSlowPeriod
int
20
Slow MA Period
InpMaMethod
ENUM_MA_METHOD
MODE_EMA
MA Method
InpSignalTimeframe
ENUM_TIMEFRAMES
PERIOD_H1
Signal Timeframe
InpVerboseLogging
bool
true
Verbose Logging
InpMaxPositions
int
1
Max Concurrent Positions
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone mounir-22/mql5-ea-framework 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 MetaTrader 5 expert advisor serves as a foundational template for building automated trading systems. The README is minimal, but the code provides a structured framework for beginners to implement custom entry and exit logic using price data and technical indicators. It includes examples of Exponential Moving Aver
This repository provides a software development kit and a collection of example Expert Advisors for MetaTrader 5 designed to work with custom tick and volume bar charts. It includes template robots that execute trades based on moving average crossovers or price action relative to moving averages on non-time-based chart
MT5 Agent Toolkit is a developer framework and collection of expert advisors designed to automate the creation and testing of MQL5 strategies using AI agents. It provides headless PowerShell scripts to bypass common MetaTrader 5 command-line failures during compilation and backtesting. The included example robots, such
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
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