Support Board
Date/Time: Tue, 26 Nov 2024 04:33:24 +0000
[Programming Help] - [ACSIL] - Cost of sc.GetStudyArrayUsingID
View Count: 415
[2023-12-28 13:03:35] |
backinblack - Posts: 35 |
Hi, I have a few custom studies which rely on grabbing data from multiple studies/charts. My code has a lot of snippets of following style: SCFloatArray otherStudyArray; sc.GetStudyArrayUsingID(otherStudy.GetStudyID(), otherStudySG.GetSubgraphIndex(), otherStudyArray); float otherStudyVal= otherStudyArray[Index]; - I wish to understand how GetStudyArrayUsingID is working at a higher level. Is it copying the source/original array into a target array or just internally providing a reference to the source/original array? (I am assuming the 1st option would be a costlier operation for large arrays) - For most cases, I am looking to fetch the latest value on the source array and If it is indeed the 1st option (A copy op), then I am toying with the idea of keeping the latest candle data of source array into a Persistent Variable too and accessing the PV from the study thus avoiding the need to copy the array. Does that sound like a good way to do it or are there other ways to do this as well? Thanks J |
[2023-12-28 19:17:48] |
mkata - Posts: 103 |
Have a look at post #3 in the following thread: ACSIL - Couple of questions on sc.GetStudyArrayUsingID |
[2023-12-28 20:15:02] |
backinblack - Posts: 35 |
Thank you! That makes it crystal clear - (Note to self - do better next time searching through forums :) )
|
To post a message in this thread, you need to log in with your Sierra Chart account: