Function SeriesInfoInteger() is buggy

To add comments, please log in or register
bruanitos
4
bruanitos  
datetime first_date;
res  = CheckLoadHistory("AUDUSD", Period(), time[bar]);
SeriesInfoInteger("AUDUSD",Period(),SERIES_FIRSTDATE,first_date);

int CheckLoadHistory(string symbol,ENUM_TIMEFRAMES period,datetime start_date)
  {
     datetime first_date, linuxtimestart;

     linuxtimestart = D'1971.01.01';
     SeriesInfoInteger(symbol,Period(),SERIES_FIRSTDATE,first_date);   
     if(first_date>linuxtimestart && first_date<=start_date) return(1);
   
     if(SeriesInfoInteger(symbol,PERIOD_M1,SERIES_TERMINAL_FIRSTDATE,first_date)) // if this SeriesInfoInteger is removed the rest behaves properly
     {
        ... some jobs
     }
     return (-1);     
   }    
SeriesInfoInteger in main code and in CheckLoadHistory function returns two different values for same parameters.
To add comments, please log in or register