Cum (Function)

image\trumpet2.gif Disclaimer

The Cum series function accumulates the values in a data series beginning with the first bar in the chart (BarNumber = 1), up through the current bar.

Syntax

Cum(Price)

Returns (Double)

A numeric value containing the cumulative total of Price including the current bar.

Parameters

Name Type Description
Price Numeric Specifies which bar value (price, function, or formula) to accumulate.

Remarks

The input parameter Price can be a bar value such as Close, High, Low, Open, or Volume. It can also be any mathematical calculation such as High + Low) / 2, or a numeric function such as RSI, Stochastic, or ADX.

Examples

Assigns to Value1 the accumulated total Volume for each bar on the chart starting from the first bar on the chart, then plots Value1:

Value1 = Cum(Volume);

Plot1(Value1, "AccVol");

Assigns to Value1 the average accumulated total Volume for each bar on the chart starting from the first bar on the chart, then plots Value1:

Value1 = Cum(Volume) / Barnumber;

Plot1(Value1, "AvgAccVol");