Cant get "optimization on all Market Watch symbols " to make any passes.

 
2021.05.09 19:27:29.198 Experts optimization frame expert c7v3 (NDX,H4) processing started
2021.05.09 19:27:29.230 Tester cache file 'tester\cache\c7v3.all_symbols.H4.20190509.20210509.42.B08B95713B257D0449574AFA30811961.opt' deleted
2021.05.09 19:27:29.399 Tester Experts\c7v3\c7v3.ex5 on NDX,H4 from 2019.05.09 00:00 to 2021.05.09 00:00
2021.05.09 19:27:29.399 Tester optimization on all Market Watch symbols started
2021.05.09 19:27:29.399 Core 1 connecting to 127.0.0.1:3000
2021.05.09 19:27:29.400 Core 1 connected
2021.05.09 19:27:29.400 Tester history synchronization of 3 Market Watch symbols started on 2 threads
2021.05.09 19:27:29.400 Tester WS30: history data begins from 2016.04.13 00:00
2021.05.09 19:27:29.400 Tester WS30: ticks data begins from 2019.05.09 00:00
2021.05.09 19:27:29.400 Tester NDX: history data begins from 2016.06.08 00:00
2021.05.09 19:27:29.400 Tester SPX500: history data begins from 2016.04.05 00:00
2021.05.09 19:27:29.400 Tester SPX500: ticks data begins from 2019.05.09 00:00
2021.05.09 19:27:29.400 Core 2 connecting to 127.0.0.1:3001
2021.05.09 19:27:29.400 Tester NDX: ticks data begins from 2019.05.09 00:00
2021.05.09 19:27:29.400 Tester Market Watch symbols history synchronized
2021.05.09 19:27:29.400 Core 2 connected
2021.05.09 19:27:29.408 Core 1 authorized (agent build 2875)
2021.05.09 19:27:29.408 Core 2 authorized (agent build 2875)
2021.05.09 19:27:29.418 Tester testing on Market Watch symbols finished, total passes 0
2021.05.09 19:27:29.429 Statistics optimization done in 0 minutes 00 seconds
2021.05.09 19:27:29.431 Core 1 connection closed
2021.05.09 19:27:29.431 Core 2 connection closed


Each of the three symbols works fine when I run them one at a time with optimization disabled. A regular genetic optimization also works fine. I've tried m1 ohlc. I've tried short/longer sample size. I've tried other symbols. I've rebooted. I've cleared all the data from the bases directory and started from scratch.

EDIT:
This is what's in the /tester/logs
OL 0 19:46:01.913 Startup MetaTester 5 x64 build 2875 (02 Apr 2021)
MI 0 19:46:01.924 Server MetaTester 5 started on 127.0.0.1:3001
CR 0 19:46:01.926 Startup initialization finished
LF 0 19:46:01.935 127.0.0.1 login (build 2875)
OR 0 19:46:01.950 127.0.0.1 tester forced to stop

EDIT:
Other EA work fine it is just this one EA.
 
If I put this line in the working EA then I get the appropriate error and I still get passes with 0 trades:
return(INIT_AGENT_NOT_SUITABLE);

But if I put it in the EA which I am having trouble with there is still no error and no passes so that tells me the process is crashing even before the oninit is called. 

Suspects:
too many inputs, too many arrays. too many include files/too many lines of code.
 
Benjamin Dixon:
If I put this line in the working EA then I get the appropriate error and I still get passes with 0 trades:

But if I put it in the EA which I am having trouble with there is still no error and no passes so that tells me the process is crashing even before the oninit is called. 

Suspects:
too many inputs, too many arrays. too many include files/too many lines of code.
OR 0 19:46:01.950 127.0.0.1 tester forced to stop

Do you have any statement in your code to stop the tester ? TesterStop() or even ExpertRemove()

If yes you need to investigate why it's triggered. If not, it's probably something else in your code (which trigger possibly due to an MT5 bug), as you have the problem only with this EA.

 
Alain Verleyen:

Do you have any statement in your code to stop the tester ? TesterStop() or even ExpertRemove()

If yes you need to investigate why it's triggered. If not, it's probably something else in your code (which trigger possibly due to an MT5 bug), as you have the problem only with this EA.

Hi Alain, thanks for your reply.

I do not have TesterStop() or ExpertRemove() in my code anywhere nor in any of the include files.

Yes probably something else in my code since it is only this one EA. 

Is there something more I should do to report this bug? I could only find a general recommendation to post bugs in the forum.

 
Benjamin Dixon:

Hi Alain, thanks for your reply.

I do not have TesterStop() or ExpertRemove() in my code anywhere nor in any of the include files.

Yes probably something else in my code since it is only this one EA. 

Is there something more I should do to report this bug? I could only find a general recommendation to post bugs in the forum.

Maybe you could also check if you have the same problem with an other broker.

To report the bug, you will need to provide code to reproduce the issue, and a small explanation how to reproduce it. If you do it I will add your bug to my topic.

If you can't post the code publicly, please contact me in private and I will explain you how to proceed.

MT5/mql5 reported and confirmed bugs.
MT5/mql5 reported and confirmed bugs.
  • 2021.04.23
  • www.mql5.com
I will use this topic to post reported bugs to Metaquotes in a centralized place. Please DON'T POST here without contacting me in private firstly...
 
Alain Verleyen:

Maybe you could also check if you have the same problem with an other broker.

To report the bug, you will need to provide code to reproduce the issue, and a small explanation how to reproduce it. If you do it I will add your bug to my topic.

If you can't post the code publicly, please contact me in private and I will explain you how to proceed.

OK sure in the meantime I created my first python script. It seems to work. Iterates through all the symbols one at a time and makes a test and a report.

import os

mt5inidir = r'D:\test\myini.ini'
directory = r'C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\A6260AEED2D6E7E5976B5FCB754\bases\Default\history'
mt5dir = r'C:\PROGRA~1\HIOL~1\terminal64.exe /config:D:\test\myini.ini'
for entry in os.scandir(directory):
    if (entry.is_dir()):
        print(entry.name)
        myini = '''[Tester]\nExpert=c7v3\c7v3.ex5\nShutdownTerminal=1\nModel=1\nReport=''' + entry.name + '''\nSymbol='''+entry.name
        print(myini)
        f = open(mt5inidir, "w")
        f.write(myini)
        f.close()
        print(os.system(mt5dir))
Reason: