Announcement

Collapse
No announcement yet.

Using EFS2 Keltner on volume chart

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

  • Using EFS2 Keltner on volume chart

    I would appreciate your advice on this efs. I am trying to create a bollinger band and keltner channel squeeze. I am using 1-min data from the ES, but want to display it on a fast 830-V chart.

    I have combined the EFS2 and get the lines that I want on the V chart, using 1 min for the interval. But am having a problem in realtime with the way the bar background color displays. I am trying to highlight the space between the bands in yellow when the BB is inside the KC. But on tick charts, some of the V bars are closing with zero values for the KC, so the highlighting gets disrupted. Of course, reloading the efs clears up the problem.

    Can you give me some input on how to fix this realtime display problem?

    Thanks Joe.
    Attached Files

  • #2
    Joe
    As far as I can see there are a couple of issues with your efs.
    The first one is that when using setComputeOnClose() and efsInternal() or efsExternal() that are based on an external interval getValue(0) will return null in real time. This is why you are getting incorrect signals in real time that are then resolved by a reload.
    However even if you were to remove the setComputeOnClose() statement you would still need to consider the issue described in depth in this post.
    The solution then is to always use completed bars. The changes required would be to remove setComputeOnClose() and to replace all instances of xxx.getValue(0) in lines 110-113 with xxx.getValue(-1). This will ensure that on a reload of the efs the plots and the signals that appear on the chart will be the same as those generated in real time.
    Having said that if you instead want the signals to be based on the current bar and you are willing to forego the fact that on a reload of the efs the signals that were generated in real time may no longer appear on the chart (for the reasons described in the linked post) then you should remove the setComputeOnClose() and replace all instances of xxx.getValue(0) with getSeries(xxx)
    Regardless of all the above there is also the issue that you are using intervals that are not guaranteed to be always synchronized. See this post by Dion on the subject.
    Alex

    Comment

    Working...
    X