--001e680f15686a229e046c937fb6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Jun 17, 2009 at 3:33 PM, David Newton <info / freesportsarbitrage.com>wrote: > Hello all, > > I am a ruby novice who would really appreciate some guidance with the > following: > > I am trying to calculate a 5 day weighted moving average based on a set > of numbers in a data series. The most recent is given a * 5 weight, the > next * 4 etc etc. with the oldest (the 5th number) * 1. > This should do the trick for you http://gist.github.com/131578 John --001e680f15686a229e046c937fb6--