Login Page - Create Account

Support Board


Date/Time: Sat, 08 Feb 2025 02:11:32 +0000



Post From: Calculate a moving average based on a custom variable

[2020-06-17 19:16:17]
MattK - Posts: 42
Actually, I spoke too fast :(

Sorry for the dumb questions but I'm still stuck.

I tried to create an array like you said, but the function returns 0. I checked with a debug message and MABody30 = 0 all the time.

Do you know what I am doing wrong?

SCFloatArray realBody;
realBody[sc.Index] = sc.BaseData[SC_OPEN][sc.Index]-sc.BaseData[SC_LAST][sc.Index];
sc.MovingAverage(realBody, MABody30Subgraph, MOVAVGTYPE_SIMPLE, 30);
float MABody30 = MABody30Subgraph[sc.Index];

Thanks!
Date Time Of Last Edit: 2020-06-17 19:25:07