Login Page - Create Account

Support Board


Date/Time: Mon, 23 Jun 2025 09:25:14 +0000



Post From: ASCIL - excluding Saturday, Sunday and/or weekend data

[2022-03-01 16:38:47]
1+1=10 - Posts: 270
HighLowForTimePeriod implements manual looping using the for-loop below. Inside that for-loop you need to put the if statement, along with the other relevant code; you likely need:

NOTE: "Index" in below for loop refers to the bar index being processed by your code. In automatic looping a different bar, referred to by sc.Index is processed for every call of your study. In manual looping on the other hand you need a loop such as below and you can process as many bars as you want for each call of your study. Yes, check out the docs: Working with ACSIL Arrays and Understanding Looping: Manual Looping/Iterating


for (int Index = sc.UpdateStartIndex; Index < sc.ArraySize; Index++)
{
// Other code

if (YourInputToControlExcludingWeekendData.GetYesNo())
{
if(sc.BaseDateTimeIn[Index].GetDayOfWeek() == SATURDAY ||
sc.BaseDateTimeIn[Index].GetDayOfWeek() == SUNDAY )
{
continue;
}
}

// Other code
}

Date Time Of Last Edit: 2022-03-01 16:39:48