MT5 command line backtest not saving .html report

 

I’m running MT5 backtests through the command line using a .bat and .ini file. Everything works — MT5 opens, runs the test, and shows “saving report…” window dialog — but no .html report is ever created in the specified directory.

I’ve tried:

  • Using /config: with full paths

  • Different report names and locations (C:, Documents, etc.)

  • Setting ReplaceReport=1

  • Running as admin

  • Even with correct permissions, still no file is created

I’m not using portable mode — I’d like the same .html report generated when saving manually from the Strategy Tester.

Has anyone found a reliable fix for this?

my ini
[Tester]
Expert=test long.ex5
ExpertParameters=C:\MT5\Tests\test_long.set
Symbol=EURJPY.m1
Period=H12
Model=1
UseLocal=true
Optimization=0
ForwardMode=0
Spread=0
Deposit=1000
Currency=USD
Leverage=1:20
Report=C:\MT5\
ReplaceReport=1
ReportMode=1
my bat

cd "C:\Program Files\MT5 Testing Terminal"
terminal64.exe /config:"C:\MT5\Tests\test_long.ini"
 
Victor Elvis Guzman Marte:

I’m running MT5 backtests through the command line using a .bat and .ini file. Everything works — MT5 opens, runs the test, and shows “saving report…” window dialog — but no .html report is ever created in the specified directory.


As per documentation, Report setting should be a file name, not a directory.

BTW, what is ReportMode? I don't see any reference of such setting.

Platform Start - For Advanced Users - Getting Started - MetaTrader 5 Help
Platform Start - For Advanced Users - Getting Started - MetaTrader 5 Help
  • www.metatrader5.com
After installation, a group of programs of the trading platform is added to the Start menu, and the program shortcut is created on the desktop. Use...
 
Stanislav Korotky #:

As per documentation, Report setting should be a file name, not a directory.

BTW, what is ReportMode? I don't see any reference of such setting.


I found the report(s)! Look like it was saving the reports but I was looking in the wrong place. I was looking at the subfolders instead of the main folder. I have quite a few reports from trouble shooting earlier. Also, ignore ReportMode. I was having chatgpt help me find the issue and added that.

If anyone else has this issue. the reports are located in

User\AppData\Roaming\MetaQuotes\Terminal\AS96HTV598FW2GV..... folder.


Thank you!