Login Page - Create Account

Support Board


Date/Time: Wed, 12 Mar 2025 11:55:03 +0000



Post From: Vector losing it's value ACSIL (need persistent vector)

[2024-12-24 11:08:29]
Balazs - Posts: 13
Hi Everybody,

I need serious help from ACSIL gurus as I cant figure out how to make a vector persistent. I want create a vector that holds the values (lines) of imbalances that are still not crossed, so I can calculate with them later and access them quicker rather than doing a for loop in sc.GetStudyLineUntilFutureIntersectionByIndex.

So I created the vector (std::vector(....), the code does the calculations correctly, the vectors stores the values of the lines I want stored.

BUT then on the next cycle(Bar) (i have autoloop set to true). the vector is empty(?) and refills them with the values found in on that Bar (if any). I know this because I have the size of the vector printed on every bar (see picture). it is not a consecutive number ( size of vector for bar n adding to the value of bar n-1), but a size only true for that bar. every bar show 1 instead of 1 ... 2.... 3 (adding the number of found lines of that bar to the vector).

So long story short. How can I make the vector persistent so the new found values of the current bar are added to the vector of the previous bar?
Date Time Of Last Edit: 2024-12-24 11:21:25
imageScreenshot 2024-12-24 120705.png / V - Attached On 2024-12-24 11:07:57 UTC - Size: 88.35 KB - 43 views