Announcement

Collapse
No announcement yet.

There might be some bug related to time template

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

  • There might be some bug related to time template

    Last Friday was holiday and the market was closed. Right now it is Sunday morning.

    I have a 24 hour time template which is configured as

    1min, 2 days, 0:00-24:00
    5min, 3 days, 0:00-24:00

    I just found out that there is no date on 1min charts if I use that time template. However if I change the number of days from 2 days to 3 days, I have no problem to load 1min charts.

    I had no problem to load 1min charts in Saturday evening. Right after the time passed 12:00am, it stoped to work.
    So I believe there is a bug in time template (in eSginal 10 only?) when number of days is used in time templates, perticularlly when a holiday is involved and trying to load chart during weekend (Sunday only?)

    I bet everything would work fine on Monday and the bug can only be reproduced today.


    Because there is no data on 1min time frame, all scripts running on 5Min charts which access 1min data may have problems, depends on how many days are specified for 1min time template. If it is 2 days, the script may exit prematurely without any sign and can not even be catched by try -- catch.

    A testing script is attached.

    - Clearpicks
    Attached Files
    Last edited by clearpicks; 03-22-2008, 10:55 PM.

  • #2
    For intraday time template with 3 days configured, there are only bars of 03/20 being shown on charts.

    I checked some historical intraday chart, it seems eSignal consider sunday as a trading day because for many futures, the trade starts arround 18:xx on Sunday. So in my case, right now, it only shows data of 03/20, 03/21 and 03/23. However the market is closed for 03/21 and the exchange is not open on 03/23 yet, so only 03/21 data is shown.

    If the number of days is set to 2 days, then esignal only tries to show bars of 03/21 and 03/23 and no bars on charts at all.

    When it was Saturday, esignal tries to load data of 03/19, 03/20, 03/21 on charts for 3 days time template, and since no data for 03/21, the actual number of days shown on charts is 2 days.

    Shouldn't esignal be aware of the days when the market is closed and excluse them when deciding the number of days shown on intraday charts?

    For those indices such as $SPX, $INDU, by no means Sunday should be considered as a trading day.

    - Clearpicks
    Attached Files

    Comment


    • #3
      Re: There might be some bug related to time template

      clearpicks
      As I understand it the algorithm used by the Time Templates is not based on trading days so in those instances of a holiday preceeding or following a weekend one currently needs to add a day to compensate. BTW this behavior is the same in all versions of eSignal and not just version 10 (see following screenshot captured using version 8).



      Having said that Friday was not a holiday across the board as some markets (such as Forex) were open. In fact if you were to load a 1 minute chart for one of those symbols you would see data plotted even using a 2 day Time Template (see following screenshots using version 10 build 1086)





      Anyhow as far as I know eSignal is aware of this behavior (as I and others have already reported it) and it is my understanding that the logic for Time Template is going to be modified to use trading days.
      With regards to calling lower external intervals from a higher interval chart I find it is good practice to either set the Time Template to request the same number of days for all the intervals used or to use the setIntervalsBackfill() function which was created on purpose to avoid the type of problem you describe (see screenshot enclosed below which was captured after adding setIntervalsBackfill(true) to your script)
      Alex




      Originally posted by clearpicks
      Last Friday was holiday and the market was closed. Right now it is Sunday morning.

      I have a 24 hour time template which is configured as

      1min, 2 days, 0:00-24:00
      5min, 3 days, 0:00-24:00

      I just found out that there is no date on 1min charts if I use that time template. However if I change the number of days from 2 days to 3 days, I have no problem to load 1min charts.

      I had no problem to load 1min charts in Saturday evening. Right after the time passed 12:00am, it stoped to work.
      So I believe there is a bug in time template (in eSginal 10 only?) when number of days is used in time templates, perticularlly when a holiday is involved and trying to load chart during weekend (Sunday only?)

      I bet everything would work fine on Monday and the bug can only be reproduced today.


      Because there is no data on 1min time frame, all scripts running on 5Min charts which access 1min data may have problems, depends on how many days are specified for 1min time template. If it is 2 days, the script may exit prematurely without any sign and can not even be catched by try -- catch.

      A testing script is attached.

      - Clearpicks

      Comment


      • #4
        Alex,

        Thanks for your reply. The setIntervalsBackfill() was added based on my suggestion a few years ago. I think it was added to prevent the chart on a higher timeframe request too many data of a lower timeframe.


        - Clearpicks

        Comment


        • #5
          clearpicks
          I am aware of when and why the function was added as I was involved in that too (see this thread) and in fact I mentioned it knowing you were familiar with it. To be precise the function was created to enable or disable - depending on the requirement - the back filling of external data.
          Alex


          Originally posted by clearpicks
          Alex,

          Thanks for your reply. The setIntervalsBackfill() was added based on my suggestion a few years ago. I think it was added to prevent the chart on a higher timeframe request too many data of a lower timeframe.


          - Clearpicks

          Comment

          Working...
          X