ta.cum
Add up a series bar by bar, such as a running volume total, over the run or each period.
ta.cum(source, reset)Running total of the series from the first bar of the run, or of each period with reset.
Parameters
A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
source | Series | number | - | - | The series to read. |
reset | Constant | string | - | - | Restarts the total at the first bar of each session, day, week, month, quarter or year (an option, written reset=session). |
Output
| Name | Type |
|---|---|
value | number |
Warm-up and missing values
- Warm-up
- 1 bar.
- Missing values
- na observations are skipped. The running total keeps its value. Each period starts empty.
Example
ta.cum(volume)plot(ta.cum(volume), "Running volume")