I am running a three-point moving average [MA] in data series of fixed length, and collected at fixed time intervals [i.e., series of 150 data points collected every 30 minutes for weeks at the time]. A traditional MA would merge two data series together, so I ended up adding a new column with data series [incrementing numbers using "Sequence( , , ,)"], and using it as a limiter for the range where the MA should run. The script works and it is quite simple, but I want to use a more effective one.
Is there a way to do this using a For Loop where "i" is the data series ID?
How do I run the same script on multiple columns without having to change the variable name?
This is the script I am currently using:
If( :Time > 1 & :Time < 149,
:T1_F[Row() - 1, Empty()],
:T1_F[Row() + 1, Empty()],),
Where "T1_F" is my Y variable to smooth, and I have a couple of hundred Y's to smooth.