Functions
talib.cum()
Accumulates `source` as the script advances through the chart. There is no `length` argument: this is a running total rather than a moving window. For a window, use `talib.sum`.
Syntax
talib.cum(series float source) → series float
Arguments
source required series float The series to accumulate. Return Type
series float Example
indicator("Cumulative Sum Example", overlay=false)
// Define input source
src = close
// Compute cumulative sum
cumulative_sum = talib.cum(src)
// Plot the result
plot(cumulative_sum, title="Cumulative Sum", color=color.blue)