Support Board
Date/Time: Thu, 28 Nov 2024 01:43:45 +0000
Post From: Recalculating sc.SimpleMovAvg() within manual loop.
[2023-06-20 11:03:34] |
User431178 - Posts: 544 |
First and second arguments are SCFloatArrayRef, you are passing in the float value at i_Index for each. Indexing is controlled by the third argument, as function requires 4 arguments with manual looping. SCFloatArrayRef SimpleMovAvg(SCFloatArrayRef FloatArrayIn, SCFloatArrayRef FloatArrayOut, int Index, int Length); int Current_Index = sc.Index; On Event { Input_SMA_Length.SetInt(10) // Now iterate through the sc.SimpleMovAvg() array an update the data/values for (int i_Index = 0; i_Index <= Current_Index; ++i_Index) { sc.SimpleMovAvg(sc.BaseData[SC_LAST], Subgraph_SimpleMA, i_Index, Input_SMA_Length.GetInt()); } } |