Support Board
Date/Time: Mon, 03 Feb 2025 22:41:25 +0000
Inconsistent times
View Count: 676
[2019-12-05 08:16:32] |
T44 - Posts: 363 |
v2021 Data/Trade Service Settings | Time Zone = CST Study Clock - Real Time showing the correct time (02:09) on the chart in question. ACSIL code running on the same chart SCDateTime CurrentDateTime; if (sc.IsReplayRunning()) { CurrentDateTime = sc.CurrentDateTimeForReplay; String LogMessage; LogMessage.Format("SC thinks replay is running"); sc.AddMessageToLog(LogMessage, 0); } else { CurrentDateTime = sc.CurrentSystemDateTime; } int Hour, Minute, Second; Hour = 0 ; Minute = 0 ; Second = 0; TIME_TO_HMS(CurrentDateTime, Hour, Minute, Second); SCString LogMessage; LogMessage.Format("Hour is %d, Minute is %d, ", Hour, Minute ); sc.AddMessageToLog(LogMessage, 0); gives message log output "Hour is 12, Minute is 10" consistently. Even when clock time has advanced to e.g. 02:14. The last time I shut down Sierra I had run Chart Replay so thought this could have been a cause, which is why I added the "SC thinks replay is running" output which does not appear in the message log. Have tried restarting Sierra Chart. Noticed this as several studies I use have logic based on the current time and it was all wrong this morning. I hadn't changed/recompiled anything since yesterday when I updated to v2021 pre release. Date Time Of Last Edit: 2019-12-05 08:19:59
|
[2019-12-05 12:01:26] |
Sierra Chart Engineering - Posts: 104368 |
Your code has a mistake in it. This is the corrected section: int Hour, Minute, Second;
Hour = 0; Minute = 0; Second = 0; CurrentDateTime.GetTimeHMS(Hour, Minute, Second); Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2019-12-05 12:01:35
|
To post a message in this thread, you need to log in with your Sierra Chart account: