What is mavg operator in Sequence used for? How inputs are g

Posted by Kanchana Gopalakrishnan on 13-Dec-2016 22:35

Sequence operator-mavg

All Replies

Posted by Jan Krishnamurthy on 13-Dec-2016 23:27

E.g. Trade.mavg = security.price->sortedBy(marketDate)->mavg(30)

If Trade.mavg is a Decimal attribute, marketDate a Date attribute, and security.price refers to a collection of Decimal attributes, Sequence rule operator mavg returns a Decimal value that is the moving average of the first 30 instances of sequence security.price.

This thread is closed