ma#

swordfish.function.ma()#

Calculate the moving average (whose type is determined by maType) in a sliding window of the given length.

Parameters:
  • X (Constant) – A vector/matrix/table.

  • window (Constant) – A positive integer indicating the size of the sliding window.

  • maType (Constant) – The type of moving averages. It is an integer in [0,8].0= sma , 1= ema , 2= wma , 3= dema , 4= tema , 5= trima , 6= kama , 8= t3 . Note that value 7 (mama) is not supported.