I'm trying to script several optimizations to run from the command line to run overnight and save the results. I have encountered two really huge bugs that are complete showstoppers, among some other frustrations:
1) I cannot script Complex Criterion max for Optimization. I think it is supposed to be OptimizationCriterion=7 in the .ini file, but it always chooses Balance Max instead.
2) The optimization report .xml file is always blank with no data. The header row exists with titles, so it is writing at least that data, but there are no results in the columns below, even though there are a lot of results in the Optimization Results tab. Between these two huge bugs, scripting is useless and I have to manually run every test one at a time.
3) The report filename always saves as .symbols.xml even if you specifically state a filename like AUDCAD.xml; it will still insert an unwanted .symbols into the filename like AUDCAD.symbols.xml.
4) Some things will not work unless .set files and .ini files are under MQL5\presets or MQL5\Profiles\Tester, you can't reference them from another folder, it says they cannot be found. You also can't save the report to a custom folder, it seems to only work to the terminal.exe folder and subfolders.
Please fix these four bugs so that scripting backtests is functional. Thank you!
--Aaron
add 1: I have not yet worked with command line but OnTester() does not work?
add 4: I use Link Shell Extension for this problem.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm trying to script several optimizations to run from the command line to run overnight and save the results. I have encountered two really huge bugs that are complete showstoppers, among some other frustrations:
1) I cannot script Complex Criterion max for Optimization. I think it is supposed to be OptimizationCriterion=7 in the .ini file, but it always chooses Balance Max instead.
2) The optimization report .xml file is always blank with no data. The header row exists with titles, so it is writing at least that data, but there are no results in the columns below, even though there are a lot of results in the Optimization Results tab. Between these two huge bugs, scripting is useless and I have to manually run every test one at a time.
3) The report filename always saves as .symbols.xml even if you specifically state a filename like AUDCAD.xml; it will still insert an unwanted .symbols into the filename like AUDCAD.symbols.xml.
4) Some things will not work unless .set files and .ini files are under MQL5\presets or MQL5\Profiles\Tester, you can't reference them from another folder, it says they cannot be found. You also can't save the report to a custom folder, it seems to only work to the terminal.exe folder and subfolders.
Please fix these four bugs so that scripting backtests is functional. Thank you!
--Aaron