Announcement

Collapse
No announcement yet.

How to make an EFS Study ignore displayed bars

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

  • How to make an EFS Study ignore displayed bars

    Hi,

    I was wondering if there was some way to have a study be applied to incoming bars only, and ignore the bars that are already on the chart. I am trying to write an alert that looks for certain price criteria and goes off -- however, I only care about whether future bars satisfy this criteria.

    Any ideas?

    Thanks,

    Jake.

  • #2
    Re: How to make an EFS Study ignore displayed bars

    Jake
    Keep in mind that alerts are triggered only on the current bar and not on historical bars.
    That said you can prevent an efs from executing on historical bars by adding the following line of code at the beginning of the main() function
    if(getCurrentBarIndex()<0) return;
    Hope this helps
    Alex


    Originally posted by radix
    Hi,

    I was wondering if there was some way to have a study be applied to incoming bars only, and ignore the bars that are already on the chart. I am trying to write an alert that looks for certain price criteria and goes off -- however, I only care about whether future bars satisfy this criteria.

    Any ideas?

    Thanks,

    Jake.

    Comment

    Working...
    X