Download MetaTrader 5

very long time to copy rates

To add comments, please log in or register
williamwong
732
williamwong  

void OnStart()
  {
   datetime t[];
   datetime d=D'2011.5.2 20';
   uint time=0;
   int i;
   for(i=0;i<5;i++)
     {
      uint bef=GetTickCount();
      int items=CopyTime("AUDCAD",PERIOD_M1,d,2,t);
      uint aft=GetTickCount();
      time+=aft-bef;
      Print("return from ",d," copied=",items," secs=",(aft-bef)/1000.0);
      d=t[0];
     }
   Print("avg time (secs)=",time/i/1000.0);

  }

 

took about 51sec to respond, if there is no available historical data it should respond immediately! 

I made the same observation in ticket #180729, I was told it was solved, apparently it is not.

To add comments, please log in or register