Navigation: Realtest Script Language > Syntax Element Details >







Multi-Bar Functions


Look for a sequence of conditions within a specified number of bars


Sequence(count, condition1, condition2, ...)


count - the count of bars to look within

condition1 - the first condition

condition2 - the second condition

... - any number of additional conditions


Returns 1 (true) if condition1 and condition2 and any other conditions specified all occurred within the most recent count bars and occurred in the specified sequence.

Returns 0 (false) otherwise.

It does not matter how many bars separate the condition occurrences nor what happens during those intervening bars, only that these conditions occurred in this sequence within this many bars.


Look for a breakout to a new 100-day high followed by a pullback lasting at least 5 bars followed by another new high, all within the past 10 bars:





Copyright © 2020-2024 Systematic Solutions, LLC