The Col Moving Average() function is what you need to use.
For your averaging the formula would be:
Col Moving Average( :Data, 1, 0, 5 )
To calculate the sum it would be
Col Moving Average( :Data, 1, 0, 5 ) * 6
Documentation on the function is found in the Scripting Index
Help==>Scripting Index
look for Statistical Functions
Jim