Here are some ideas for weighted average (wa) and weighted moving average (wma)
wa * %&(+/) [ wma [ wa"1 #...@[ ]\ ] 1 2 wa 10 20 16.6667 1 1 wa 10 20 15 1 2 1 wa 10 20 30 20 1 2 1 wma 10 20 30 40 50 20 30 40 A recent thread discussed EWMA's http://www.jsoftware.com/pipermail/programming/2009-November/016898.html ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
