Login Page - Create Account

Support Board


Date/Time: Wed, 15 May 2024 03:47:02 +0000



[Programming Help] - ACSIL: Is it possible to get(create) an extra array for another chart?

View Count: 513

[2020-05-26 23:47:33]
LenderDevTest - Posts: 15
Hi, The problem is that I need to calculate a Moving Average from another chart with different time resolution.
Yes, we can get the SCGraphData from others charts using sc.GetStudyArraysFromChart() and then get a SCFloatArrayRef that we required.
But we can't pass the array to any of SC study functions(sc.MovingAverage(...)) because of all of them requires not only array In, but also array Out!!!
We can create extra arrays that only fits for the chart that the study is applied to. But, what about other charts with higher or lower time resolution?

The thing is that I need to calculate different MA types from another chart width different time resolution. The only way I see is to use custom arrays(vector<float>) that match the size of the ArraySize of another chart and then calculate almost all MA types manually!!! Because of we can't pass custom arrays to any sc.*** study funcrion. Even if we can declare SCFloatArray that the study functions require, we can't resize it to match the size of the ArraySize of another chart just to call sc.MovingAverage(...)

Is there any better solutions?
Thanks!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account