Login Page - Create Account

Support Board


Date/Time: Sat, 08 Feb 2025 03:32:45 +0000



Post From: SimpleMovAvg returns 0

[2020-06-19 18:06:38]
DonMattez - Posts: 8
Hello,

in some instances, this code


int InMALength = 8;
int InSubGraph = 2;

sc.SimpleMovAvg(sc.BaseDataIn[SC_LAST], sc.Subgraph[InSubGraph].Data, InMALength);
float FlTrendBefore = sc.Subgraph[InSubGraph].Data[sc.Index - 1];
float FlTrendActual = sc.Subgraph[InSubGraph].Data[sc.Index];

behaves differently than expected.

In this case, FlTrendBefore is 0 at the the index 121. But it should be a value more or less close to FlTrendActual , which contains the actual value at the index 122.

Do you have an explanation why it could be so?