Skip to Time in Strategy Tester by code

 

Hi all,

I want strategy tester to start from exact time like 11:35:00

Can I say it by a function like OnTester() { SkipToTime(11:35:00) }

 
MEHMET FATIH BARUT:

Hi all,

I want strategy tester to start from exact time like 11:35:00

Can I say it by a function like OnTester() { SkipToTime(11:35:00) }

No, just read the doc. about OnTester!

You have to integrate this in OnTick() by e.g. MQLInfoInteger(MQL_TESTER)

 
Carl Schreiber:

No, just read the doc. about OnTester!

You have to integrate this in OnTick() by e.g. MQLInfoInteger(MQL_TESTER)

How can I add this in OnTick?

 
MEHMET FATIH BARUT: How can I add this in OnTick?
When in doubt, think!
input datetime testerStart = D'…';

void OnTick(){
   if( (bool)MQLInfoInteger(MQL_TESTER) && TimeCurrent() < testerStart) return;
   ⋮