SumSince
- sum of array elements since condition was tru

Moving averages, summation
(AFL 4.10)


SYNTAX SumSince( condition, array )
RETURNS Array
FUNCTION The function calculates running sum of array elements since condition was true. It works like:

x = Cum( array ) - ValueWhen( condition, Cum( array ) );

or like:

x = Sum( array, BarsSince( condition ) );

but much faster.

EXAMPLE
SEE ALSO Cum() function , Sum() function , BarsSince() function , ValueWhen() function

References:

The SumSince function is used in the following formulas in AFL on-line library:

More information:

Updated on-line reference