Report file from .ini file saving an empty .xml file

 

I'm running an "All Market Watch symbols" optimization in MetaTrader 5 using a .ini file via the command line. The .ini specifies a single symbol (e.g., symbol=EURUSD ) and runs without error. However, the XML report that should be generated after the optimization is completely empty — it contains only headers.

The relevant section of the .ini looks like this:

symbol=EURUSD
report=MyStrategy_EURUSD
ReplaceReport=1
ShutdownTerminal=1

If I open the Strategy Tester manually, run the same optimization, and then save the report as XML, it works perfectly — the XML is populated with all optimization results. But when doing it through command-line automation using /config:... , the report is empty.

The EA is designed for single-symbol use and runs correctly in manual optimization. There is nothing wrong with the EA or its input parameters when tested manually.

Has anyone encountered a similar issue — where optimization via command-line but produces an empty report file? Is there something extra required to make the XML report actually populate when run non-interactively?

Any help would be appreciated. I can share the full .ini or EA if needed.

 
I got the same issue and it seems there is no solution available online. What I currently do is use ShutdownTerminal=0, manually export the result to replace the head-only XML generated. The optimization actually run properly but there is something wrong with export, thats really annoying
 
h Jimjal #:
I got the same issue and it seems there is no solution available online. What I currently do is use ShutdownTerminal=0, manually export the result to replace the head-only XML generated. The optimization actually run properly but there is something wrong with export, thats really annoying
If you want to report a bug you need to provide the information needed to reproduce the issue. In this case, ini file mainly, maybe logs.