Announcement

Collapse
No announcement yet.

setComputeOnClose

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

  • setComputeOnClose

    Good morning,

    Will using setComputeOnClose(); force the use of the actul tick Close value in tick Playback rather than using the Open? Will High and Low be the correct values?

    Best Regards,

    Alan

  • #2
    Alan
    If you have setComputeOnClose() in preMain the efs will run only once per bar on the first tick of a new bar. The values that will be returned by the efs are those of bar index -1 ie the most recent completed bar.
    You can easily verify this by running the enclosed script
    Alex

    PHP Code:
    function preMain(){
        
    setComputeOnClose();
    }
    function 
    main(){
        return new Array (
    open(0), high(0), low(0), close(0));

    Comment

    Working...
    X