Announcement

Collapse
No announcement yet.

differentiate historical bars and bars going forward

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

  • differentiate historical bars and bars going forward

    Hi,

    I understand that eSignal runs the entire efs at the beginning of the loading of an efs. How do I separate the codes that are meant to run on historical bars only from the codes that are meant to run on bars going forward only. Assuming all my computation is at end of a bar.

    Thank you in advance.

    William

  • #2
    William
    You could enclose the code that needs to be run only on historical bars inside a conditional statement that checks for getCurrentBarIndex() to be less than 0 (see the example at the linked article)
    Alternatively you could check for isLastBarOnChart() to be true or false and then apply the same logic.
    Alex

    Comment


    • #3
      Thanks again, Alex.

      William

      Comment


      • #4
        William
        You are most welcome
        Alex

        Comment

        Working...
        X