Download MetaTrader 5

SeriesInfoInteger("EURUSD",0,5) randomly returning 1970.01.01 00:00:00. bug?

To add comments, please log in or register
Lucero del Alba
20
Lucero del Alba 2012.07.04 01:53 

That is, in other words, this:

void OnTick {
  Print( (datetime)SeriesInfoInteger( Symbol(), PERIOD_CURRENT, SERIES_LASTBAR_DATE ) );
}

normally returns the proper server time for the last bar for the current period whichever it is; however it randomly returns "1970.01.01 00:00:00" for no apparent reason since none the Symbol(), nor the current period changed; then a few ticks later when a new bar was generated, it returns back to the correct server time.

It sounds pretty much like a bug, although maybe I'm not taking something into account.  Any clue, anybody?

onewithzachy
2271
onewithzachy 2012.07.04 02:14  
Lucero:

That is, in other words, this:

normally returns the proper server time for the last bar for the current period whichever it is; however it randomly returns "1970.01.01 00:00:00" for no apparent reason since none the Symbol(), nor the current period changed; then a few ticks later when a new bar was generated, it returns back to the correct server time.

It sounds pretty much like a bug, although maybe I'm not taking something into account.  Any clue, anybody?

Hi Lucero,

Nope, no clues. Just a thought, did you set the number of Bars to unlimited ?. I set mine to 10,000 and no error on M1 chart.

:D 

Documentation on MQL5: Timeseries and Indicators Access / Bars
  • www.mql5.com
Timeseries and Indicators Access / Bars - Documentation on MQL5
Alexey Da
Moderator
6651
Alexey Da 2012.07.04 09:30  

We are investigating this behaviour. Please wait for a while.

Lucero del Alba
20
Lucero del Alba 2012.07.04 23:27  

Hi onewithzachy, thanks for the comment.  I didn't try that, but I wouldn't think it's related since I wasn't myself changing the number of bars in between, other than when a new bar was generated.  Right now I'm doing some other testings but I'll be keeping an eye on that when I get back to that testing, keeping in mind your suggestion.

Hi Alex, no prob.  Frankly I'm not sure if I caused it myself accidentally somehow (though it didn't seem it was the case), right now I'm working on something else but I'll get back on this if I find anything relevant.

Documentation on MQL5: Timeseries and Indicators Access / Bars
  • www.mql5.com
Timeseries and Indicators Access / Bars - Documentation on MQL5
To add comments, please log in or register