Lipi Reference Lipi

Functions

talib.sum()

Adds up the last `length` values of `source`. It is a moving window, which is what separates it from `talib.cum`.

Syntax

                talib.sum(series float source, series int length) → series float
              

Arguments

source required series float The series to add up.
length required series int How many bars the window covers.

Return Type

series float

Example


          indicator("Sum of Close Prices", overlay=false)
length = input(10, "Sum Length")
sumClose = talib.sum(close, length)
plot(sumClose, color=color.blue, title="Sum of Close Prices")