Hi, I want to apply ema and similar functions (like mmad, mavg, mwavg, msum etc.) on array vector. (ie suppose a row of table as array vector is [1,4,1,2], now I want to calculate msum with 3 places the desired result will be [NULL,NULL,6,7])
1) Please guide me how to do.
2) Is it possible to apply these functions on array vector in reactive state engine ?
Code:-
t = table(1:0, `id`price`val, [INT, DOUBLE[], INT[]]);
t.tableInsert([1,2,3,4], [[1.1,1.2,1.3,1.2], [1.3,1.2,1.0,1.4], [1.0,1.4,1.1, 1.4], [1.1, 1.4, 1.0,1.4]], [[1,2,4,1],[1,4,1,2],[2,5,4,1],[3,7,5,6]])
Now I want to calculate ema(price,2) and msum(val,3) for each array vector. The input table and desired output is shown below.
Reply as soon as possible.
refer to https://ask.dolphindb.net/question/1157
array Vector in reactiveStateEngine will supported by next version. However, adding the function of calculating msum among array vector is not part of the plan of next version. It may be realized at least after next version.