Announcement

Collapse
No announcement yet.

Can you get day amount from time template?

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

  • Can you get day amount from time template?

    Is there a simple way to get the amount of days in the current Time Template? Ie im using 6 days on a 9-1600 chart. I know you can use getInterval to get the time interval of the current template. Is there a parameter for the days? Thanks!

  • #2
    Geoff
    The Time Template is not available to efs at this time. You may want to send a suggestion to [email protected]
    Having said that if you want to know how many days are loaded in a chart you can do that with a simple counter that increases by 1 at every BARSTATE_NEWBAR of getBarStateInterval("D")
    Alex

    Comment


    • #3
      Geoff
      Another way to count the days is to increase the counter by 1 at every instance of day(0)!=day(-1)
      Alex

      Comment


      • #4
        Dual replies!

        Thanks! I just wanted to add a check for over 30 days. If you load my current study on a chart over 30 days it takes too long to load. Even though Im using getindex and barstate. Does eSignal 'cache' all the external EFS files in a study on load? I notice if you change the contents of one while the script is running it doesn't affect that run until the script is 'reloaded'. So externalEFS just means "load it up in memory once and be at peace"?

        hehe

        G

        Comment


        • #5
          Geoff

          Does eSignal 'cache' all the external EFS files in a study on load?
          Yes it loads them in memory. Also, if you have multiple efsExternal() calls to the same efs each instance will be loaded in its own memory space.

          I notice if you change the contents of one while the script is running it doesn't affect that run until the script is 'reloaded'.
          That is true of any efs that you are running on a chart. If you change its contents the changes are not implemented until you reload the efs.

          So externalEFS just means "load it up in memory once and be at peace"?
          That is correct.
          Alex

          Comment

          Working...
          X