Support Board
Date/Time: Wed, 31 Dec 2025 08:15:36 +0000
Post From: TimeScaleAdjustment doesn't work as expected
| [2017-04-19 17:57:30] |
| Usermb - Posts: 126 |
|
Using SC 1540. Global (DTS) Timezone is set to Brussels. Chart Timezone is set to New York. I have a study on this chart that accesses the Time and Sales records and tries to match them to the bars of the chart based on their time. Assume tsEntry is a s_TimeAndSales variable containing a valid value for the a record with the time 13:41:40.000, as displayed by Time and Sales window. Here's what the output of tsEntry.DateTime according to the study looks like: 17:41:40.000 (as expected, the time is not adjusted) The same output for (tsEntry.DateTime + sc.TimeScaleAdjustment) is: 19:41:40.000 (NOT as expected, this is my global timezone, but that's not what the chart uses) PS: if you have a better idea on how to match these entries, please let me know. Nonetheless, I think the above behavior is a bug. PS2: I believe the second example from ACSIL Interface Members - Variables and Arrays: sc.TimeScaleAdjustment is obsolete. |
