Sum

Top  Previous  Next

Finds the sum of the series.

 

Syntax

 

Sum( series, bars, [offset] )

 

Parameters

series

 

the name of the series

bars

 

the number of bars over which to find the value

offset

 

the number of bars to offset before finding the value

 

 

 

returns

 

the sum

 

Example

 

' Find the sum of the 10 closes starting 20 days ago

sumCloses = Sum( instrument.close, 10, 20 )

 

 

 

This example shows the use of the common auto indexed series. For information on using functions with non auto indexed series review Series Functions.