thanks very much for the replies,

How would I do that using and amending the original code?

cheers




John W Higgins wrote:
> 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

-- 
Posted via http://www.ruby-forum.com/.