Strategy Tester End Date

 

There's any way (workarounds and crazy ideas are wellcome) to get the strategy tester end date in the optimization start method (OnInitStart)?

 

I could read it form the tester log. it register it like this:

2017.06.02 06:26:54.591 Tester  Experts\Vilela One.ex5 on WIN$N,M1 from 2015.06.01 00:00 to 2017.06.01 00:00

But unfortunately it's outside de "file sandbox".

string filename=TimeToString(TimeLocal(),TIME_DATE);
StringReplace(filename,".","");
filename="..\\..\\tester\\logs\\"+filename+".log";
FileOpen(filename,FILE_READ);
Print(GetLastError()); // Returns 5002: Invalid file name
Any other idea?
 
Henrique Vilela:

I could read it form the tester log. it register it like this:

But unfortunately it's outside de "file sandbox".

Any other idea?

Already had this issue, to know which testing mode was used (Every tick, Open prices,...). I didn't found a nice solution. I ended with input parameters

If you can use DLL, a solution would be to use WINAPI to read file outside the sandbox.

 
Alain Verleyen:

Already had this issue, to know which testing mode was used (Every tick, Open prices,...). I didn't found a nice solution. I ended with input parameters

If you can use DLL, a solution would be to use WINAPI to read file outside the sandbox.


Thank you, I might end using DLL. :/

Did you open a ticket with a suggestion? If you didn't I will.

 
Henrique Vilela:


Thank you, I might end using DLL. :/

Did you open a ticket with a suggestion? If you didn't I will.

No I didn't (as far as I remember).

Please use this topic to keep up posted about your ticket.

 
Henrique Vilela:

I could read it form the tester log. it register it like this:

But unfortunately it's outside de "file sandbox".

Any other idea?
What is your task exactly if you can accept to read it from the log after the test? You can detect last date used during test process.
 
Stanislav Korotky:
What is your task exactly if you can accept to read it from the log after the test? You can detect last date used during test process.
It's in the log at the start of the test.
 
Stanislav Korotky:
What is your task exactly

I have a Python script to run WFA tests. It runs the MT, saves the results, change the date, runs MT... you got the picture. :)

Now I'm trying to make a full mql solution.

Stanislav Korotky:
...if you can accept to read it from the log after the test? You can detect last date used during test process.

Yes, after the test is done it's easy to get this information, I can get it calling TimeCurrent() in the OnDeinit() function.

Unfortunately I need this information in the OnTesterInit function.

So far I have two options:

1 - Use input variables (but the user can set different dates from the strategy tester)

2 - Use DLL (not desired).


Any other idea? Can be a crazy one. :)



 
Henrique Vilela:

I have a Python script to run WFA tests. It runs the MT, saves the results, change the date, runs MT... you got the picture. :)

Now I'm trying to make a full mql solution.

Yes, after the test is done it's easy to get this information, I can get it calling TimeCurrent() in the OnDeinit() function.

Unfortunately I need this information in the OnTesterInit function.

So far I have two options:

1 - Use input variables (but the user can set different dates from the strategy tester)

2 - Use DLL (not desired).

Any other idea? Can be a crazy one. :)


Actually, I did it other way round via 2 options which available:

- redesign WFA to not use the end date;

- redesign WFA to perform optimization internally (in MQL) after the tester made all passes and the end date is known.

 
Stanislav Korotky:


Actually, I did it other way round via 2 options which available:

- redesign WFA to not use the end date;

- redesign WFA to perform optimization internally (in MQL) after the tester made all passes and the end date is known.

Sounds great!

Could you tell us more about your process?

 
Henrique Vilela:

Sounds great!

Could you tell us more about your process?

Both approaches are covered in the blogs - here is the first one and the second.