Hello, am experiencing a little bit of an issue, I was trying to create custom reports using the OnTesterPass, OnTesterInit and OnTesterDeinit functions as explained on this great article https://www.mql5.com/en/articles/746, but I noticed when I optimize my EA on SLOW COMPLETE ALGORITHM and using OPEN PRICES ONLY, and the Total Passes go around 9000, am not getting all the frames. So I thought this could be a problem with my EA so I used the Moving Average EA that comes with the MT5 installation and added the following code:
//Global Counterint counterxp=0;
// Add a framedoubleOnTester()
{
double stat_array[1];
stat_array[0]=TesterStatistics(STAT_PROFIT);
FrameAdd("Statistics",1,0,stat_array);
return0;
}
//Increase Global countervoidOnTesterPass()
{
counterxp++;
}
//Print when finishedvoidOnTesterDeinit()
{
Print("counterxp=",counterxp);
ChartClose(0);
}
When am printing counterxp every time I run the tester, I get a different number of frames, does anyone know why is this happening?
In case someone wants to reproduce am using MetaQuotes as a broker, with the following parameters, as you can see on the screenshot:
Inputs Tab:
When I export to XML on Optimization Result Tab am getting all the Passes.
We continue the series of articles on MQL5 programming. This time we will see how to get results of each optimization pass right during the Expert Advisor parameter optimization. The implementation will be done so as to ensure that if the conditions specified in the external parameters are met, the corresponding pass values will be written to a file. In addition to test values, we will also save the parameters that brought about such results.
Hello, am experiencing a little bit of an issue, I was trying to create custom reports using the OnTesterPass, OnTesterInit and OnTesterDeinit functions as explained on this great article https://www.mql5.com/en/articles/746, but I noticed when I optimize my EA on SLOW COMPLETE ALGORITHM and using OPEN PRICES ONLY, and the Total Passes go around 9000, am not getting all the frames. So I thought this could be a problem with my EA so I used the Moving Average EA that comes with the MT5 installation and added the following code:
When am printing counterxp every time I run the tester, I get a different number of frames, does anyone know why is this happening?
In case someone wants to reproduce am using MetaQuotes as a broker, with the following parameters, as you can see on the screenshot:
Inputs Tab:
When I export to XML on Optimization Result Tab am getting all the Passes.