Lipi Reference Lipi

Functions

talib.cum()

Cumulative (total) sum of source. In other words it's a sum of all elements of source.

Syntax

                talib.cum(series float source) → series float
              

Arguments

source required series float Source used for the calculation.

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)