Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 01:35:57 +0000



Post From: Recalculating sc.SimpleMovAvg() within manual loop.

[2023-06-20 09:54:43]
User92573 - Posts: 530
Dear Support Board

Any help or direction gratefully received.

I'm simply trying to recalculate the sc.SimpleMovAvg() array following an event/change in data.



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][i_Index], Subgraph_SimpleMA[i_Index], Input_SMA_Length.GetInt());

}


}


The rror message is "cannot convert argument 1 from 'float' to 'SCFloatArrayRef'"

As I'm learning ACSIL this has me a little stumped so any help or direction appreciated.

Many thanks.