Login Page - Create Account

Support Board


Date/Time: Wed, 18 Jun 2025 12:32:00 +0000



Post From: Pass Array from GetStudyLineUntilFutureIntersectionByIndex to SubGraph

[2022-08-03 07:26:35]
User431178 - Posts: 714
Do you see the problem here?


int LineIndex = 0;
LineIndex = sc.GetNumLinesUntilFutureIntersection(sc.ChartNumber, sc.Input[1].GetStudyID()) - 1;

You are setting the LineIndex variable to the index of the last added LineUntilFutureIntersection, and accordingly, as you have found, you will only ever see the most recent line.

Another problem is that you have Autoloop disabled, but are trying to use sc.Index.
Working with ACSIL Arrays and Understanding Looping: Automatic Looping/Iterating


Here is a modified version of your code, I'll leave you to add the relevant details in the loop.


const int LineIndexArraySize = sc.GetNumLinesUntilFutureIntersection(sc.ChartNumber, sc.Input[1].GetStudyID()) - 1;

for (int LineIndex = 0; LineIndex < LineIndexArraySize; ++LineIndex)
{
sc.GetStudyLineUntilFutureIntersectionByIndex(sc.ChartNumber, sc.Input[1].GetStudyID(), LineIndex, LineIDForBar, StartIndex, LineValue, EndIndex);

.... insert your other relevant code

}