Custom (User-Defined) Criterion
Custom (User-Defined) Criterion - Beyond built-in metrics, both platforms support custom fitness formulas. In MT5 one can use the
Complex Criterion or write custom MQL5 code to compute a combined metric. In cTrader, a developer can override
GetFitness(GetFitnessArgs args)
in a cBot to compute a custom fitness score from the pass data (for example, using the win rate:
return args.WinningTrades / args.TotalTrades;
). This lets you prioritize any combination of performance statistics.