Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 03:40:43 +0000



Post From: How to get the start of period for date time when using a non time based chart?

[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