A lightweight library for simplifying indicator and EA development in MetaTrader 5, inspired by the simplicity of Python/FastAPI, the lightness of Lua, and the modularity of TypeScript/NestJS.
EASY_INDICATOR(ClassName)- Automatic indicator registrationEASY_EXPERT(ClassName)- Automatic EA registration- No need for manual OnInit/OnDeinit/OnCalculate boilerplate
- Method chaining for clean, readable code
- All setters return
*thisfor chaining
O(n)- Open price at shift nH(n)- High price at shift nL(n)- Low price at shift nC(n)- Close price at shift nMA(n, m)- Moving average with period n at shift m
- Parameter validation with range checks
- Required field validation
- Error logging for validation failures
EasyServices::Config()- Global config accessEasyServices::Events()- Event manager access
- Strategy-based architecture
- Register multiple strategies with
.Use()method - Automatic execution in onTick/onTimer
class SimpleMA : public EasyIndicator
{
public:
bool onSetup()
{
setTitle("Simple MA")
.addBuffer(Line, Blue, 1, "SMA");
return true;
}
bool onUpdate(int total, int prev)
{
// Use Python-like macros: O(0), H(0), L(0), C(0)
double ma_value = MA(14, 0); // MA period 14, current bar
return true;
}
};
EASY_INDICATOR(SimpleMA) // Auto-registrationclass MATradingStrategy : public EasyStrategy
{
public:
void onTick()
{
if(C(0) > MA(14, 0) && C(1) <= MA(14, 1)) // Cross above MA
{
if(!hasPositionBySymbol(_Symbol))
openBuy();
}
}
};
class SimpleMAEA : public EasyExpert
{
public:
bool onSetup()
{
setSymbol(_Symbol)
.Use(new MATradingStrategy()); // Multi-strategy support
// Config validation
EasyServices::Config()
.addParamInt("MAPeriod", 14, "MA Period", true, 1, 100)
.validate();
return true;
}
};
EASY_EXPERT(SimpleMAEA) // Auto-registrationEasyConfig.mqh- Configuration management with validationEasyCore.mqh- Core classes (EasyIndicator, EasyExpert, EasyStrategy)EasyHelpers.mqh- Helper functions and Python-like macrosEasyMQL.mqh- Auto-registration macros and event handlers
Copy the EasyMQL folder to your MQL5 Include directory.
Copyright 2026, EvolveBeyond