This is a modular MQL5 codebase containing reusable classes and utilities designed to accelerate EA development, backtesting, and live deployment for MetaTrader 5. It includes complete solutions for trade management, risk control, signal generation, time-based utilities, and more.
The EA uses standard MQL5 built-in indicators, but can be easily modified to use custom indicators if desired:
-`iMA`– Moving Average (used for trendline estimation)
-`iRSI`– Relative Strength Index (used as a trigger)
-`iCCI`– Commodity Channel Index (used for confirmation)
-`iOBV`– On-Balance Volume (used for volume filtering)
-`iStochastic`– Stochastic Oscillator (used for exit signals)
**Note:** These indicators were selected for simplicity and demonstration purposes only. They are **not optimized** for trading performance and should be replaced or tuned during real development and testing. The architecture is fully modular and allows for plugging in better-suited or proprietary indicators.
All indicator handles are dynamically created and released via the `ResourceManager` class, ensuring clean memory handling during runtime and backtests.
---
## Installation & Usage
1. Clone or download this repository.
2. Copy the `MyLibs/` directory into your MT5 `Include/` folder:
3. Place the example EA file into the `MQL5/Experts/` directory.
4. Open **MetaEditor** and compile the EA.
5. Attach it to a chart or run backtests.
---
## Backtesting & Optimization
The EA supports advanced backtesting scenarios via: