Support Board
Date/Time: Wed, 15 Jan 2025 22:50:29 +0000
Array of persist var
View Count: 1145
[2017-09-08 17:57:04] |
User53601 - Posts: 106 |
Hello, I want to use the sc.Subgraph[x].Arrays[y] as an array of persist var. I want to set the values for sc.Subgraph[x].Arrays[y] only once, at the beginning of trading, It means: if ( sc.Index==0 ). My question is whether there is a limit, how many bars forward ( how far the y can be higher then sc.Index ? ) I can set the value of sc.Subgraph[x].Arrays[y], for example is this a valid code?: if ( sc.Index==0 ) { sc.Subgraph[1].Arrays[2000] = 1 ; } thank you |
[2017-09-08 18:43:48] |
Sierra Chart Engineering - Posts: 104368 |
You need to first understand that sc.Subgraph[].Arrays[][] is a two dimensional array. Refer to: ACSIL Interface Members - sc.Subgraph Array: sc.Subgraph[].Arrays[][] Your code is not valid as it is now. The second dimension extends beyond sc.ArraySize by this setting: Chart Settings: Number of Forward Columns (Chart >> Chart Settings >> Display >> Chart Display Items menu) Have a look at the persistent variable functions: sc.GetPersistentInt() Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2017-09-08 20:49:16
|
To post a message in this thread, you need to log in with your Sierra Chart account: