MQL4 - automated forex trading   /  

Forum

about bars about history data

Back to topics list To post a new topic, please log in or register

avatar
109
flourishing 2008.03.19 10:04 

int start{} function i only use this

start{
print(Bars);
}

i tred start at different time and use different time frame, always bars will be 1001, so that we only use 1001 bars history data in ea ? how to get more bars history data ? thank you. i have tried use arraycopyseries, same result.

int start()
  {
//----
   Print(Bars);
   datetime daytimes[];
   
   ArrayCopySeries(daytimes,MODE_TIME,Symbol(),Period());
  int  error=GetLastError();
   if(error==4066)
      {
      for(int i=0;i<2;i++)
         {
         Sleep(5000);
         ArrayCopySeries(daytimes,MODE_TIME,Symbol(),Period());
         
         }
      }
    Print(ArraySize(daytimes));
//----
   return(0);
  }
always be 1001 at start. after fisrt bar it will be 1002 1003 1004, but at first bar, it always can only get 1001 bars.
Back to topics list  

To add comments, please log in or register