talib.sum

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

talib.sum(series float source, series int length) → series float
ParameterTypeRequiredDescription
sourceseries floatyesThe series to add up.
lengthseries intyesHow many bars the window covers.

Returns series float — A series float total.

indicator("Volume over 20 bars")
plot(talib.sum(volume, 20))

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade