Support Board
Date/Time: Sun, 10 Nov 2024 03:19:29 +0000
Post From: Timing problems
[2014-06-20 13:00:20] |
Hendrixon - Posts: 130 |
Just as I said, sc.OnExternalDataImmediateStudyCall didn't work. Will test it next week once I'll upgrade. Thanks. Regarding the timing issue, it has nothing to do with my code. Absolutely nothing. Its all in your sc.CurrentSystemDateTime member. its really not rocket science, I'll explain it again: If a trade (i.e. Tick) has a local system time of 10:10:10.449 and you pole sc.CurrentSystemDateTime for just the "Seconds" part, it will give "10". But if the Tick has a local system time of 10:10:10.501 and above, than poling sc.CurrentSystemDateTime for just the "Seconds" part, will respond with "11". You or microsoft or whoever, is responsible for rounding the milliseconds instead of truncating them. You must find out why it happens, since local time is half the problem. I found it here since I can see the time stamp down to milliseconds (its my local system time). But, if you round the milliseconds on the "datafeed" timestamp (instead of truncating it), we the traders can't even know it happens... since we still don't have proper datafeed millisecond support. Nothing to do with my code:-) |