I have indicator code that writes out bar data to a file on bar close -- I configure the indicator to update on bar close only, so it would appear to be simple. However, I noticed in the time stamp in the data file that the bar close event one-minute bars sometimes would orruce at 58 or 59 seconds of the current as opposed to the almost always 00 or 01 seconds of the new bar. To insure that I only write the bar data just after the next bar has started, I would want to have the indicator thread sleep say 1.2 second at a time if a check shows that we haven't quite crossed the minute boundary.
Would having the thread on which the indicator is being calculated sleep interrupt/interfere with processing in other areas of the NT application?
Thanks,
Gordon
Comment