Expiry date and strategy tester

 

Hello, if i set an expiry date in my EA, is it normal that in the strategy tester the EA still opens trade? Or i did something wrong?

This is the code i used.

datetime expiryDate=D'2021.04.21 11:35';

void OnTick()
   {
      
   if(TimeCurrent()>expiryDate)
      {
      Comment("Expired");
      return;
      }

   .........  //Rest of my code
   return;
   }
 
In the tester all times are tester times (the past).
 

Oh thus only the past days tested got taken in consideration during testing.

Thank you for the clarification!