Navigation: Realtest Script Language > Syntax Element Details >

CountTrue

 

 

 

Category

Multi-Bar Functions

Description

Count of bars for which a condition was true (non-zero)

Syntax

CountTrue(condition, count {0})

Parameters

condition - formula referencing bar data

count - formula specifying a number of bars (optional)

Notes

The condition will always be evaluated for count bars (or all bars if omitted).

If the condition was never true for any bar, the return value is 0.

Unless you really care about the specific count, it is more efficient to use SinceTrue to test whether a condition has ever been true.

 

 

 

Copyright © 2020-2021 Systematic Solutions, LLC