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.