Category
Multi-Bar Functions
Description
Look for a sequence of conditions within a specified number of bars
Syntax
Sequence(count, condition1, condition2, ...)
Parameters
count - the count of bars to look within
condition1 - the first condition
condition2 - the second condition
... - any number of additional conditions
Notes
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.
Example
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:
.png)
|