Login Page - Create Account

Support Board


Date/Time: Sat, 19 Apr 2025 10:05:32 +0000



Post From: Issue with Session Reset Logic in Custom ACSIL Code

[2025-03-28 16:41:22]
JohnR - User831573 - Posts: 330
I don't have a specific answer for you, but you may want to try to step through the code with the VS2022 debugger.

I have not used these functions, but the docs say SCDateTime currentDayStart = sc.GetTradingDayStartDateTimeOfBar(sc.BaseDateTimeIn[sc.Index]);

Typically this will be the Date-Time of a bar. -- notice the word BAR in the function. You might want to change to this function.

sc.GetSessionTimesFromChart()

int GetSessionTimesFromChart(const int ChartNumber, n_ACSIL::s_ChartSessionTimes& r_ChartSessionTimes);

The sc.GetSessionTimesFromChart() function sets the chart session times in r_ChartSessionTimes for the chart defined by ChartNumber.


r_ChartSessionTimes: A s_ChartSessionTimes structure that contains the session times for the given chart. The s_ChartSessionTimes members are the following:
SCDateTime StartTime
SCDateTime EndTime
SCDateTime EveningStartTime
SCDateTime EveningEndTime
int UseEveningSessionTimes
int NewBarAtSessionStart
int LoadWeekendDataSetting


JohnR