About 60% down on this page describes the [tester] parameters that one would put into a configuration file to run a strategy test from the command line.
https://www.metatrader5.com/en/terminal/help/start_advanced/start
As examples:
- Model — tick generation mode (0 — "Every tick", 1 — "1 minute OHLC", 2 — "Open price only", 3 — "Math calculations", 4 — "Every tick based on real ticks"). If this parameter is not specified, Every Tick mode is used.
- ...
- ToDate — end date of the testing range in format YYYY.MM.DD. If this parameter is not set, the date from the corresponding field of the strategy tester will be used.
Can I access these value from an EA through MQL5 code?
For example, in my EA, I want to close all trades one-minute before the value of ToDate I chose when I hit the [Start] button.
Another example: in my EA, I want to dump a warning to my log file if I chose Model = 2.
I don't think that is possible (unless you read the file directly), but there is no need to complicate things.
Just add an extra input to your EA for the "Stop Time" (as I mentioned on your other thread), and then add that input parameter to that config file as well with the time/date you want it to stop trading.
This will be implemented in the following builds of the terminal.
This will be implemented in the following builds of the terminal.
Hi was this functionality ever implemented, I'd like to be able to access the strategy testing settings?
Many thannks,
E
Hi was this functionality ever implemented, I'd like to be able to access the strategy testing settings?

- 2019.12.07
- 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
About 60% down on this page describes the [tester] parameters that one would put into a configuration file to run a strategy test from the command line.
https://www.metatrader5.com/en/terminal/help/start_advanced/start
As examples:
Can I access these value from an EA through MQL5 code?
For example, in my EA, I want to close all trades one-minute before the value of ToDate I chose when I hit the [Start] button.
Another example: in my EA, I want to dump a warning to my log file if I chose Model = 2.