What is mavg operator in Sequence used for? How inputs are given in ruletest for this operator? - Forum - Corticon - Progress Community

What is mavg operator in Sequence used for? How inputs are given in ruletest for this operator?

 Forum

What is mavg operator in Sequence used for? How inputs are given in ruletest for this operator?

This question is not answered

Sequence operator-mavg

All Replies
  • 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.