Announcement

Collapse
No announcement yet.

Perplexing time issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Perplexing time issue

    Hi Folks,

    I'm running exactly the same script in two different places, one in Toronto, Canada and one in Dallas, Texas on two of the same type of computers which, by the way are both set to Toronto time.

    I fill my time variables in the following manner,

    vTime = getValue("Time",0)
    gBarDay = vTime.getDay();
    gBarHour = vTime.getHours();

    if(getSymbol() != "$PLAYBACK"){
    vBarYear = getYear(0);
    vBarMonth = getMonth(0);
    vBarMonths = vBarMonth-1;
    vBarDay = getDay(0);
    vBarHour = getHour(0);
    vBarMinutes = getMinute(0,inv("1"));
    vBarSeconds = getSecond(0,inv("5s"));
    myDate = new Date(vBarYear,vBarMonths,vBarDay,vBarHour,vBarMinu tes,vBarSeconds);
    }


    At 6 am in the morning, I set a global variable to "0" and print to a report by
    if ( getBarState( ) == BARSTATE_NEWBAR){
    if(gBarHour == 6){
    setGlobalValue("TotalIsDone",0);
    ActionStats = vBarHour + ":" + vBarMinutes + ":" + vBarSeconds + " " + "\t" + GoCurr + "\t\tGlobal set to 0"
    ReportDate = vBarDay + "-" + vBarMonth + "-" + vBarYear;
    ActionReport(ActionStats,ReportDate)
    }
    }

    The following function prints the report

    function ActionReport(ActionStats,ReportDate)
    {
    if(isLastBarOnChart()){
    fr = new File(GoCurr + " " + ReportDate+" Action.report");
    fr.open("at+")
    fr.writeln(ActionStats);
    fr.close();
    return;
    }
    }

    Now here's the where the issue lies ... in the reports. I can see the times being out by a few seconds but at the beginning of a new bar in Texas, I get minutes ALWAYS equal to 59 and seconds about the same (regardless of which hour i choose to print to the report). In the texas report, time is reported incorrectly when "Global set to 0" is printed to the report.

    In Canada the report looks like...
    1:42:40 AUD Chart Loaded
    5:20:0 AUD Brit Exit is true, setting Buy and Sell to False
    6:0:0 AUD Global set to 0
    6:05:35 AUD Setting initial SellDate to Wed Dec 17 2008 06:25:35 GMT-0500 (Eastern Standard Time) at chart price of 0.672
    9:15:35 AUD Setting initial BuyDate to Wed Dec 17 2008 09:25:35 GMT-0500 (Eastern Standard Time) at chart price of 0.691
    9:32:15 AUD Entered Long for 1 lots, entry at chart price of 0.6926

    In Texas the report looks like...
    1:42:0 AUD Chart Loaded
    5:21:20 AUD Brit Exit is true, setting Buy and Sell to False
    6:59:55 AUD Global set to 0
    6:05:32 AUD Setting initial SellDate to Wed Dec 17 2008 06:25:35 GMT-0500 (Eastern Standard Time) at chart price of 0.671
    9:15:35 AUD Setting initial BuyDate to Wed Dec 17 2008 09:25:35 GMT-0500 (Eastern Standard Time) at chart price of 0.691
    9:32:15 AUD Entered Long for 1 lots, entry at chart price of 0.6927

    Any help or thoughts would be greatly appreciated,
    Chris

  • #2
    Same question, posed more clearly - server problem ?

    Howdy,

    I've two Esignal accounts. ... one running on a Dell 8250 in Toronto, Canada - the other running on a Dell 8250 in Fort Worth, Texas. Albeit these are different time zones, BOTH computers are set to the same time and are synched from time.windows.com. and both show exactly the same time on their clocks and CMOS on both computers is the same.

    Running the attached script ... both computers print out the reports at exactly the same time (verified by phone). However, on a NEWBAR the computer in Canada reports

    22:0:0 CHF A0-FX Variables set to null at 22 Date Sun Dec 21 2008 22:00:00 GMT-0500 (Eastern Standard Time)

    while the computer in Texas reports

    22:59:55 CHF A0-FX Variables set to null at 22 Date Sun Dec 21 2008 22:59:55 GMT-0500 (Eastern Standard Time)

    For some unkown period (perhaps only a few seconds or minutes) the computer in Texas HAS NOT CHANGED the minutes or seconds from just prior to the new bar opening. After a bit, the Texas computer does start reporting the SAME time as the computer in Toronto. Not too mention, you can hardly have 59 minutes on open of a NEWBAR.

    Is this a problem with the particular server that the account in Texas is being streamed the data from? I could sure use a hand on this, if i tell the computers to do something in 20 minutes, obviously the system in texas is adding 59 minutes to that !!!

    Chris
    Attached Files

    Comment


    • #3
      I added in the following to the script...

      if(fr.exists() && gBarHour == 16 && vBarMinutes == 1){
      ActionStats = vBarHour + ":" + vBarMinutes + ":" + vBarSeconds + " " + "\t" + getSymbol() + "\t\tCheckin Time at " + gBarHour + " Date " + myDate
      ReportDate = vBarDay + "-" + vBarMonth + "-" + vBarYear;
      ActionReport(ActionStats,ReportDate)
      }
      this resulted in the following report

      16:59:55 CHF A0-FX Variables set to null at 16 Date Mon Dec 22 2008 16:59:55 GMT-0500 (Eastern Standard Time)
      16:1:5 CHF A0-FX Checkin Time at 16 Date Mon Dec 22 2008 16:01:05 GMT-0500 (Eastern Standard Time)
      16:1:5 CHF A0-FX Checkin Time at 16 Date Mon Dec 22 2008 16:01:05 GMT-0500 (Eastern Standard Time)
      16:1:5 CHF A0-FX Checkin Time at 16 Date Mon Dec 22 2008 16:01:05 GMT-0500 (Eastern Standard Time)
      16:1:5 CHF A0-FX Checkin Time at 16 Date Mon Dec 22 2008 16:01:05 GMT-0500 (Eastern Standard Time)
      16:1:5 CHF A0-FX
      ..... and so on for the first minute,

      to see how long the wrong time lasted ... seems the next tic, time is retrieved properly ... however, this means that everything I do based on getBarState( ) == BARSTATE_NEWBAR is going to be wrong by 59 minutes.

      Any help would be greatly appreciated.
      Chris

      Comment


      • #4
        Re: Same question, posed more clearly - server problem ?

        Chris
        FWIW I have been running your script concurrently on two computers [both using 10.2.1391 on different accounts] set up to the same timezone and connected to different servers and so far I have not been able to replicate the problem you are describing. I also tried setting the computers to different timezones and even in this case the times reported appeared to be correct (accounting obviously for the different timezones).
        You may need to provide some more details as to how the computers you are using are set up, such as [for example] what version of eSignal, the Preferences used, settings and Time Templates used in the Advance Chart, Data Manager settings, etc so that someone at eSignal can try to duplicate the same setup.
        Alex


        Originally posted by Chris747
        Howdy,

        I've two Esignal accounts. ... one running on a Dell 8250 in Toronto, Canada - the other running on a Dell 8250 in Fort Worth, Texas. Albeit these are different time zones, BOTH computers are set to the same time and are synched from time.windows.com. and both show exactly the same time on their clocks and CMOS on both computers is the same.

        Running the attached script ... both computers print out the reports at exactly the same time (verified by phone). However, on a NEWBAR the computer in Canada reports

        22:0:0 CHF A0-FX Variables set to null at 22 Date Sun Dec 21 2008 22:00:00 GMT-0500 (Eastern Standard Time)

        while the computer in Texas reports

        22:59:55 CHF A0-FX Variables set to null at 22 Date Sun Dec 21 2008 22:59:55 GMT-0500 (Eastern Standard Time)

        For some unkown period (perhaps only a few seconds or minutes) the computer in Texas HAS NOT CHANGED the minutes or seconds from just prior to the new bar opening. After a bit, the Texas computer does start reporting the SAME time as the computer in Toronto. Not too mention, you can hardly have 59 minutes on open of a NEWBAR.

        Is this a problem with the particular server that the account in Texas is being streamed the data from? I could sure use a hand on this, if i tell the computers to do something in 20 minutes, obviously the system in texas is adding 59 minutes to that !!!

        Chris

        Comment


        • #5
          Hi Alexis,
          I appreciate your taking an interest in my issue. The folks at Esignal so far have not provided any help and this is, from what I can see, a fairly important issue. After a cpl days on the forum, I phoned for support as this had me stumped and they told me to re-post on the forum.

          With that said, I only compared my two computers results to show that i wasn't nutz in so much as my programming. As far as that goes, I can't duplicate it up here in Canada either. PS - I'm not a programmer in this language.

          Seems to me, and I could be wrong, that if I ask for hours, minutes and seconds on a new bar opening - regardless of the operating system or version of ESignal or computer for that matter AND given the script that I posted running on open of a 60 min candle... it should boil down to there being the hour in question and 0 minutes and plus or minus a few seconds.

          Am i nuts ? Is my script bad ? If so, how can it differ twixt here and there ? Is this not an issue that someone at ESig can help with ? Seems to me, and again i could be wrong, if my script is solid, that its a problem with one of their Tic servers.

          oh ... and .....And Merry Christmas !!!

          Sincerely,
          Chris

          Comment


          • #6
            Day light savings time issue

            did u check if this could be a daylight savings time issue, just a thought.

            Comment

            Working...
            X