rSum()

  See Also

Related Topics

 

 

Description

rSum provides a sum of numbers in a range.

 

 

Syntax

 

 

Parameters

SERIES

Use the SERIES parameter when you are referencing a study value. In chart windows, values are displayed in decimals. In quote windows, values are displayed in the units of the underlying instrument.

 

INPUT

Use the INPUT parameter when you are referencing an overlay value.

 

periods

The period parameter defines the range in terms of the number of bars from the current bar.

 

[shift]

Optional. A number, positive or negative, enclosed in brackets defining the number of bars (periods) to shift the formula line. Typically used only in formulas that will be displayed in chart windows. Note that the brackets are literal.

 

 

Return Value

The sum of values in the range.

 

 

Examples

rSum1(SERIES,period=5)=begin

retval = RSUM(SERIES,period)

end

 

rSum2(INPUT,period=5)=begin

retval = RSUM(INPUT,period[1])

end

 

 

Comments

NA