Does MQL4/5 permit auto-backtesting?


Hi everyone, I don’t want the code or anything else, I would just want to know if it’s possibile to get automatically the backtest result when I load my EA to a chart.

For example, I’ve the trading chart of EURUSD currently open, now I insert my EA, the first thing EA would do is give me a message like this:

“EA performance on this instrument in the last n. Months: (here it gives winrate and all the stuff). Proceed to import and trading this instrument? Y/N”

Hope I’ve explained what I want to to do, it’s just I don’t know where to begin, so knowing if it’s actually possible to do this may help. Thanks.

No one?
In the navigator space/window where you initiated the EA, right click on the EA and click on Test. Set the test duration interval under the settings tab and move to inputs tab to set test parameters.
Of course it is possible to do such.

It's some work for sure. You will need to code your EAs OnTick function in such a way, that you can control on what data it is being executed.

Then all you need to do is make your EA run on past data, let it collect your stats and display them.