Skip to content

SUM

Summary

Rolling sum of the input over a fixed period. Each output is the sum of the most recent optInTimePeriod input values.

Formula

\(out_i = \sum_{j=i-(N-1)}^{i} inReal_j\), N = optInTimePeriod

Inputs

  • inReal โ€” Values to sum

Outputs

  • outReal โ€” Windowed sum over the period

Parameters

  • optInTimePeriod โ€” Window length summed

Implementation

TA-Lib Definition: sum.c ยท sum.yaml

Native File
C ta_SUM.c
Rust sum.rs
Java Core.java

TA-Lib is also available for Python, R and more using a wrapper.

Aliases

Summation, Rolling Sum, Moving Sum

See Also

SMA