Support Board
Date/Time: Sun, 12 Jan 2025 18:43:09 +0000
Post From: NewPeriodAtBothSessionStarts parameter
[2017-03-04 13:44:49] |
DabbaDo - Posts: 148 |
The documentation at http://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html#scGetStartOfPeriodForDateTime doesn't cover this parameter. But I think it means to report a new StartOfPeriod when passing each session boundary when using two sessions. But I'm confused by your code in Studies8.cpp L5911 (scsf_CumulativeDeltaBarsVolume): if (Index == 0) Reset = true; else if (ResetAtBothSessionStarts.GetYesNo() != 0 ) { SCDateTime PriorStartOfPeriod = sc.GetStartOfPeriodForDateTime(sc.BaseDateTimeIn[Index - 1], TIME_PERIOD_LENGTH_UNIT_DAYS ,1,0,1); SCDateTime StartOfPeriod = sc.GetStartOfPeriodForDateTime(sc.BaseDateTimeIn[Index], TIME_PERIOD_LENGTH_UNIT_DAYS ,1,0,1); if (StartOfPeriod != PriorStartOfPeriod) { Reset = true; } } else if (ResetAtSessionStart.GetYesNo() != 0 ) { SCDateTime PriorStartOfPeriod = sc.GetStartOfPeriodForDateTime(sc.BaseDateTimeIn[Index - 1], TIME_PERIOD_LENGTH_UNIT_DAYS ,1,0, 0); SCDateTime StartOfPeriod = sc.GetStartOfPeriodForDateTime(sc.BaseDateTimeIn[Index], TIME_PERIOD_LENGTH_UNIT_DAYS ,1,0,0); if (StartOfPeriod != PriorStartOfPeriod) { Reset = true; } } Cheers, Dale |