Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 06:48:34 +0000



Post From: New bar created before time elapses

[2014-07-28 23:43:32]
onnb - Posts: 662
hi, I have code that prints sc.CurrentSystemDateTime to a log file on bar close using sc.GetBarHasClosedStatus. I am using 5 min bars. I see that sometimes I get a print of a time like 11:59:57 seconds (i.e., before the bar should theoretically close). I am guessing that this is because timestamps are coming in with a time that is future relative to my computer clock and so SC creates a new bar thus closing the current bar?