Navigation: Realtest Script Language > Syntax Element Details >

SumSince

 

 

 

 

Category

Multi-Bar Functions

Description

Sum of values since a condition was last true, or until it becomes true

Syntax

SumSince(condition, expression, nth {1})

Parameters

condition - formula to evaluate for each bar until true (non-zero)

expression - formula to evaluate for each non-true condition bar and add to a running sum

nth - which instance of condition to use (optional)

Notes

For each bar until condition is true, expression is evaluated and added to the sum.

The sum does not include the value of expression for the bar where the condition becomes true.

If condition is immediately true, the result is 0.

If nth is positive, condition is evaluated for the most recent bar, then continues back in time until the nth non-zero value is found.

If nth is negative, condition will be evaluated for the most recent bar, then continues forward in time until the abs(nth) non-zero value is found.

If nth is not specified, the default is 1.

This function supports ultra-fast one-pass calculation when used in the Data Section without the optional argument.

 

 

 

 

 

Copyright © 2020-2022 Systematic Solutions, LLC