Home Forums Tickstory Lite Issue/Bug tracking iBarShift problems

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • imported_tickstory
    Participant
    Post count: 1479

    Hi Danny_pip, Are you able to see the minutes that are missing by looking at your debug statements?

    danny_pip
    Participant
    Post count: 26

    Hi,

    I’ve added a log-list showing the systematic error with iBarShift.

    I’ve changed the color of the record in the list where the problem arises.
    You will see that one hour is skipped when I go minute per minute back in time over 1440 minutes (= 1 day).
    The backtester is doing this systematically and never shows 1440 minutes in a day. 1 hour is dissapeared !!!!!!
    I’ve also tested this with version 1.7 and the problem remains the same.

    Here’s the code I’ve written to show the problem;

    previousday_start = iTime(NULL,PERIOD_D1,i);
    previousday_end = previousday_start + 24*60*60 -60;

    start_bar = iBarShift(NULL,PERIOD_M1,previousday_start);
    end_bar = iBarShift(NULL,PERIOD_M1,previousday_end);

    // ***** ONLY FOR TEST *****
    datetime testtime;
    int currentbar=0;
    int end = end_bar+1440;
    Log(“end_bar = ” + end_bar + “start_bar = ” + start_bar);

    for (i= end_bar; i< end; i++)
    {
    testtime = iTime(NULL, PERIOD_M1, i);
    currentbar = iBarShift(NULL,PERIOD_M1,testtime);
    Log( “i = ” + i + ” Time = ” + TimeToStr(testtime,TIME_DATE|TIME_SECONDS) + ” BarNr = ” + currentbar);
    }
    Log (“end of cycle”);
    // ***** ONLY FOR TEST TILL HERE *****

    imported_tickstory
    Participant
    Post count: 1479

    Hi Danny,

    Can you demonstrate the problem without the use of iBarShift? I’m not sure what the logs indicate, however there appears to be 1440 entries as expected. If there is no data missing from the Tickstory export, it is really something best answered by the MQL forums.

    Regards.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.