Navigation: Realtest Script Language > Syntax Element Details >

TrueInRow

 

 

 

Category

Multi-Bar Functions

Description

Count of bars in a row for which a condition was true

Syntax

TrueInRow(expr, count {0})

Parameters

condition - formula referencing bar data

count - formula specifying a number of bars (optional)

Notes

The condition will be evaluated for the most recent bar first, then proceed back in time until a FALSE (0) value is found or count bars have been checked, whichever comes first. 

If count is omitted then there is no maximum (all bars before this one are potentially checked). 

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

If the condition is currently true, but wasn't true yesterday, the return value is 1. 

If the condition was true today and yesterday, the return value is 2, and so on.

 

 

 

Copyright © 2020-2021 Systematic Solutions, LLC