Announcement

Collapse
No announcement yet.

fileObj.flush() does not seem to work

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

  • fileObj.flush() does not seem to work

    My EFS script frequently writes data to a text output file (when a new bar opens and when opening or closing trades), but the file does not contain the very latest output until I remove formula from chart - even though I call flush() and close() at end of main. I thought this would ensure that file buffer is flushed each time main closes, but flushing seems ~ 15 minutes delayed. Could it be because I use separate functions to do the actual writing? Sample stripped-down code is in attached text file. Thanks a million in advance for any help you can offer!
    Attached Files

  • #2
    Last attachment was corrupted; try this

    I don't know why the text file I attached to my original posting was corrupted, so I'm now trying to attach an .EFS file with the same sample code excerpts as before. BTW: I have 2 charts running similar EFS scripts simultaneously, and each one is writing output to a separate/unique text file in the same way. One file's buffer is getting flushed each time it writes output, the other file's buffer is NOT getting flushed.
    Attached Files

    Comment

    Working...
    X