Announcement

Collapse
No announcement yet.

Can an efs capture the start and end of a TimeTemplate period (i.e., 0930-1630)?

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

  • Can an efs capture the start and end of a TimeTemplate period (i.e., 0930-1630)?

    The ES stops trading at 1624 so a time template that uses hours of 930 through 1630 doesn't allow bar time comparisson for say 1630. For example:
    PHP Code:
    if((bartime >= 1630 && bartime 1630+getInterval()) do something 
    So in the above scenario how can an efs identify that the end of the TimeTemplate period has arrived other than using 1624 in the code instead of 1630?

    The only solution I can think of is to do a midnight check:
    PHP Code:
    if((bartime >= 1630  && bartime 1630+getInterval())) || day(0) !== day(-1)) do something 
    Thanks,
    Wayne
    Last edited by waynecd; 07-04-2012, 05:33 AM.

  • #2
    I missed it in my first search. Just use "isInSession()".

    Comment


    • #3
      "isInSession()" always returns false. I loaded on a 3 min interval chart of ES #F.

      Wayne
      Attached Files

      Comment


      • #4
        "isInSession()" only workd in real time. So it works as expected.

        Comment

        Working...
        X