Support Board
Date/Time: Mon, 20 Jan 2025 13:58:32 +0000
adding milliseconds to realtime clock to create a latency
View Count: 900
[2018-06-12 19:36:57] |
User61576 - Posts: 445 |
I took the "clock-realtime" study code and I am trying to add to it milliseconds. I changed the function from GetTimeHMS to GetDateTimeYMDHMS_MS() according to the documentation here: Working with the SCDateTime Variables and Values: GetDateTimeYMDHMS_MS() int Year= 0, Month= 0, Day= 0, Hour = 0, Minute = 0, Second = 0, Millisecond = 0;
if (sc.IsReplayRunning()) SCDateTimeMS(sc.GetEndingDateTimeForBarIndex(sc.ArraySize - 1)).GetTimeHMS(Hour, Minute, Second); else //sc.CurrentSystemDateTimeMS.GetTimeHMS(Hour, Minute, Second, MilliSecond); sc.CurrentSystemDateTimeMS.GetDateTimeYMDHMS_MS(Year,Month,Day,Hour, Minute, Second, MilliSecond); I am getting the following error: C:\SierraChart\ACS_Source>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
Clock_milliseconds.cpp C:\SierraChart\ACS_Source\Clock_milliseconds.cpp(66): error C2065: 'MilliSecond': undeclared identifier Pls advice the final goal here is to compare the time and sale clock and the local clock for latency your help is much appreciated Date Time Of Last Edit: 2018-06-12 19:38:03
|
Clock_milliseconds.cpp - Attached On 2018-06-12 19:36:09 UTC - Size: 3.53 KB - 390 views |
[2018-06-13 16:28:00] |
John - SC Support - Posts: 37327 |
Your case is wrong. You declared Millisecond as all lowercase, but then passed it into the function with a capital S.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: