Login Page - Create Account

Support Board


Date/Time: Mon, 10 Mar 2025 14:04:46 +0000



[Programming Help] - Chart Timestamps do not match ACSIL Tick timestamps

View Count: 841

[2022-02-23 02:04:26]
PanCSI - Posts: 9
Hi.

I am doing some debugging with a strategy and I just realized SierraChart is providing me with timestamp information in ACSIL which seems to be UTC, when in the chart and the global settings of SierraChart I have configured EST as the timezone.

In the following screenshot, you can see information being printed to the message log on the left and the chart on the right. As you can see from the image, timestamps on the message log show 20210808 19:... whereas in the chart you can see times around 15:... hours, which is 5 hours behind.

However, in the settings of SierraChart, the timezone seems to be correct: https://snipboard.io/d0xw1H.jpg

Thank you for your time.

Best regards,
Miguel Alfaiate
[2022-02-23 02:15:23]
Sierra Chart Engineering - Posts: 104368
Where in ACSIL are you getting UTC timestamps?
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
[2022-03-01 10:19:03]
PanCSI - Posts: 9
Hi.

This is the code I am using to retrieve the current hour, minute and second:

s_TimeAndSales Record = TimeSalesArray[Index];
Record *= sc.RealTimePriceMultiplier;

Record.DateTime.GetHour()
Record.DateTime.GetMinute()
Record.DateTime.GetSecond()
[2022-03-01 10:26:34]
Sierra Chart Engineering - Posts: 104368
Refer to the Example Code in this section here for how to adjust the record time stamp to the same time zone as the chart:
ACSIL Interface Members - Functions: sc.GetTimeAndSales()
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
[2022-04-01 08:47:58]
PanCSI - Posts: 9
Hi.

I have made the changes suggested to fix the timezone differences, but I still see things happening that seem to not match the changes.

As you can see from the screenshot, even though I am using the adjusted time settings, the timestamp that is shown in the chart is different from the one I see on the logs that I am creating: https://snipboard.io/yD8A3r.jpg

Time is off by one hour and I don't understand why. Behaviours that I am trying to trigger at time X happen at X-1, even though I am doing time comparison with the adjusted time.

What am I doing wrong?

Thank you.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account