Login Page - Create Account

Support Board


Date/Time: Fri, 10 Jan 2025 20:24:35 +0000



Post From: Get day session start time in ASCIL

[2016-09-22 04:55:52]
User763472 - Posts: 22
Dear Sir or Madam,

How can I get the day session start time directly from ASCIL code? I tried the following but none work properly. Thanks!

1)
SCDateTime StartingTime;
StartingTime.SetTime(sc.StartTimeOfDay);
int CurrentBarDate = DATE_PART(sc.BaseDateTimeIn[sc.Index]);
SCDateTime StartingDateTime = COMBINE_DATE_TIME(CurrentBarDate, StartingTime);

(Only work for Index future but not for currencies)

2)
SCDateTime StartingDateTime = sc.GetTradingDayStartDateTimeOfBar(sc.BaseDateTimeIn[sc.Index]);

3)
int StartingTime = sc.SessionStartTime();
int CurrentBarDate = DATE_PART(sc.BaseDateTimeIn[sc.Index]);
SCDateTime StartingDateTime = COMBINE_DATE_TIME(CurrentBarDate, StartingTime);