Announcement

Collapse
No announcement yet.

setComputeOnClose(true)

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

  • setComputeOnClose(true)

    Objective is to get update every close using 1,15, or 5 Minute chart

    I used "etComputeOnClose(true)"
    Added this to my script. to get update every candel close. I do get it to work for some time, then I lose the "setComputeOnClose(true)" statement from "Pre Main" .

    Thanks
    Attached Files
    Tom Shadi

  • #2
    Tom
    The problem is not caused by setComputeOnClose() (by the way you don't need to add true inside the brackets) but by the fact that you are referencing future bars in your conditions. If you want to reference past bars (as I think you do) then you need to use a negative value ie high(-1) for the high of the prior bar. Replace all the positive bar indexes with the negative equivalents and you should see the efs work correctly
    Alex

    Comment

    Working...
    X