Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 10:11:02 +0000



[Programming Help] - How to get the start of period for date time when using a non time based chart?

View Count: 525

[2019-04-23 18:12:31]
User119530 - Posts: 15
I am using a 1 trade chart and want to reset some values on the hour but when using

SCDateTime PriorStartOfHour = sc.GetStartOfPeriodForDateTime(sc.BaseDateTimeIn[Index - 1], TIME_PERIOD_LENGTH_UNIT_MINUTES, 60, 0, 0);
SCDateTime StartOfHour = sc.GetStartOfPeriodForDateTime(sc.BaseDateTimeIn[Index], TIME_PERIOD_LENGTH_UNIT_MINUTES, 60, 0, 0);
if (StartOfHour != PriorStartOfHour) {...}

it never resets

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

Login

Login Page - Create Account