Obtain time from strategy tester

 

Hello, 

I would like to refer to the time, which is noted in the settings of strategy tester.

Is there a command that allows me to do this?

Example: in the strategy tester, I have defined a custom period of 01.01.2022 - 30.03.2022.

The "end date" in this case is 30.03.2022.

I would like to obtain this "end date" during the runtime of the program.

Thanks a lot!

 

Yes

https://www.mql5.com/ru/code/26132

#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/ru/code/26132

datetime GetTesterEndDate( void )
{
  stringStr ;

  return (MTTESTER::GetSettings(Str) ? ( datetime )MTTESTER::GetValue(Str, "ToDate" ) : 0 );  
}
 
Enrique Dangeroux #:

Yes

https://www.mql5.com/ru/code/26132

thanks a lot!!