Support Board
Date/Time: Sun, 19 Jan 2025 03:18:42 +0000
sc.TimeScaleAdjustment for previous Index
View Count: 780
[2018-03-19 08:42:46] |
User612903 - Posts: 51 |
Hello, In a custom study I'm getting the current UTC datetime like this : sc.DateTimeToString((sc.BaseDateTimeIn[sc.Index] - sc.TimeScaleAdjustment), FLAG_DT_COMPLETE_DATETIME_MS);
This work fine. But now if I get the datetime of "Index-3" like this : sc.DateTimeToString((sc.BaseDateTimeIn[sc.Index-3] - sc.TimeScaleAdjustment), FLAG_DT_COMPLETE_DATETIME_MS);
If daylight saving changed between "Index-3" and "Index" then the result is not correct. Is there a way to access something like : sc.TimeScaleAdjustment[sc.Index-3]
Thanks a lot for your help, Regards Date Time Of Last Edit: 2018-03-19 10:58:35
|
[2018-03-19 19:53:33] |
Sierra Chart Engineering - Posts: 104368 |
You need to use this function: sc.ConvertDateTimeFromChartTimeZone() 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: