Programmatically access Strategy Tester Launch Settings?

 

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:

  • Modeltick 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.

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 them to run the platform. Two copies of the platform cannot run from the same directory. If you need to run multiple copies at the same time, install the appropriate number of programs in different...
 
Anthony Garot:

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:

  • Modeltick 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.

 
fxsaber:

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

 
EdFuk:

Hi was this functionality ever implemented, I'd like to be able to access the strategy testing settings?

Here.

Библиотеки: MultiTester
Библиотеки: MultiTester
  • 2019.12.07
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Библиотеки: MultiTester
Reason: