Why does time filter works by local time instead of server time based?

 
string eeeee="";//8. TRADING TIME FILTER 
string start_time = "07:15";//Disable time end 
string end_time = "05:50";//Disable time start 

-------------------------------------------------------------------------

bool time_check(){
   bool in_range=(TimeCurrent()<StrToTime(end_time)||TimeCurrent()>StrToTime(start_time));
   
   if(StrToTime(start_time)>StrToTime(end_time)&&in_range){
      Comment("in trading hours");
      return true;
      }
   if(!(TimeCurrent()>StrToTime(start_time) && TimeCurrent()<StrToTime(end_time))){
      Comment("NOT in trading hours");
      return false;//
      }
   Comment("in trading hours");
   return true;

What did I missed?

 
  1. Forexalpha777:

    Why does time filter works by local time instead of server time based?

    It doesn’t. TimeCurrent is last known server time.

  2. in_range is bogus. It must be between start and end.

 
William Roeder #:
  1. It doesn’t. TimeCurrent is last known server time.

  2. in_range is bogus. It must be between start and end.

Thank you for the tip