Function moving gives an error

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.

请先 登录 后评论

最佳答案 2021-11-12 21:59

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)

请先 登录 后评论

其它 0 个回答

  • 1 关注
  • 0 收藏,991 浏览
  • Vishvesh Upadhyay 提出于 2021-11-10 17:45

相似问题