Skip to main content

Function: sum()

sum(s, length): f64

Sum of the last length values of s, as of the current bar (na until length bars exist). Pine returns a series here; this returns the current value. ponytail: computed as sma * length; add a ta_core Sum Kind if math.sum(...)[1] history is ever needed.

Parameters​

s​

Series

length​

i32

Returns​

f64