moving(def(x,y)->avg(abs(x-y.last())), [tp,sma], timeP) gives error: func must be an aggregate function
It was working in 2.00.1 but not in 2.00.2
Please help.
In the new version, aggregate functions must be defined with 'defg'.
defg avg_abs(x,y)
{
return avg(abs(x-y.last()))
}
moving(avg_abs, [tp,sma], timeP)