Announcement

Collapse
No announcement yet.

Time Templates

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

  • Time Templates

    Hi,

    Is there a way to load diferent Time Templates based on the base interval, dynamically?

    I am using a smaller external interval, which changes with the base interval [for example, 5min in 15 min charts, 2min in 5min charts, etc.] and
    a/ I want to avoid using setBackFill, which proves to be rather slow and
    b/ I want to avoid loading unecessary data with a generic Time Template that encompasses all time intervals [for example, don't need 2min, 30min, 60min, or Daily data in 15min charts].

    Istead, I want to create diferent Time Templates that will load only the data I use [for example, 2 and 5min in 5min charts, 5 and 15 min in 15 min charts, etc.].

    Thank you.
    Mihai Buta
    Mihai Buta

  • #2
    Mihai
    As far as I know there isn't. Having said that a Time Template is just a definition of how much data gets loaded (and with what Start/End times if these are defined) when a specific interval is loaded in a chart or called as an external interval using inv(). In other words you are not loading any unecessary data just because an interval is defined in the Time Template.
    Alex

    Comment


    • #3
      Alex thank you.

      Can you please elaborate a bit on "unecessary data is not loaded"?

      In order to work properly in any base interval [from 1min to monthly charts], I have to ask the Time Template to bring enough data for all time intervals [1, 2, 5, 15, 30, 60, D, W, M], when I actually will need/use only four of them, depending on the base Time Interval.
      The rest is what I call "unecessary data", because will not be used.

      Maybe if I should rephrase the question: If all the above time intervals are declared in a Time Template, is it true that all specified data in fetched [regardless of which time intervals are actually ised by efs]?

      Thank you.
      Mihai
      Mihai Buta

      Comment


      • #4
        Mihai
        Assuming I understood your question correctly the answer is no it is not true.
        All the Time Template does is define how much data is loaded when a specified interval is being used. So if at one point you have only two charts open - one for 5 min and the other for 15 min - the Time Template will load the amount of data that you have defined for those two intervals. It will not load the data for all the other intervals that you have defined in the Time Template
        Alex

        Originally posted by mbuta
        Alex thank you.

        Can you please elaborate a bit on "unecessary data is not loaded"?

        In order to work properly in any base interval [from 1min to monthly charts], I have to ask the Time Template to bring enough data for all time intervals [1, 2, 5, 15, 30, 60, D, W, M], when I actually will need/use only four of them, depending on the base Time Interval.
        The rest is what I call "unecessary data", because will not be used.

        Maybe if I should rephrase the question: If all the above time intervals are declared in a Time Template, is it true that all specified data in fetched [regardless of which time intervals are actually ised by efs]?

        Thank you.
        Mihai

        Comment


        • #5
          Alex,

          Sorry for the late reply.

          Maybe I did not ask correctly the question, because I was reffering to charts with multiple time intervals. However, it is not all that important, because I gave up on using smaller time interval [which created the problem]. The overhead of loading that data is too much for my already crowded script.

          I also realized that I do not get what I expected: a split reading of the base interval into subdivisions [silly to hope it in first place].


          Thank you.
          Mihai
          Mihai Buta

          Comment


          • #6
            Mihai
            It is the same even in the case of charts in which you are running scripts that use multiple intervals. All the Time Template will do is define how much data will be loaded for each external interval being called.
            Alex

            Comment


            • #7
              Alex,

              Thank you. Jay explained very clearly how it works on my other post on similar subject.
              Note: I still have my "freezing" problem though and searching for reasons and ways to avoid them. It is absolutelly a nightmare.

              Mihai
              Mihai Buta

              Comment

              Working...
              X