Announcement

Collapse
No announcement yet.

coloring pricebar on setComputeonclose

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

  • coloring pricebar on setComputeonclose

    Hi Alex,

    In the last year(s) of trying to write scripts and correctly follow others, I still miss the one point of undestanding how things work.

    In the enclosed script , could you explain and correct as to why that when you use setComputeOnClose() , the price bars do not automactically change color when called for.(you have to reload efs) ?

    I understand the use of computeonclose() delays the computation of formulas till the open of next bar, but how do you correctly the change of color whithout reloading all the time?? I tried to enclose the lines of code with CURRENTBARSTATE, NEWBARSTATE, but I still have to reload script to get appropriate color change. OF course, when setOnCompute is removed, it colors automatically and correctly on every tick.

    Thanks for your help !!!

    angelo
    Attached Files
    ang.

  • #2
    angelo
    My function libraries cannot be used with setComputeOnClose(). You will need to rewrite the logic that draws the arrows to execute at BARSTATE_NEWBAR.
    Alex

    Comment

    Working...
    X