Page 1 of 1

Need help in pattern search

Posted: Fri Apr 23, 2021 2:58 pm
by skb
Hello,

I'm trying to build an indicator that searches for the following pattern:

Red "leg" candle
Followed by 1 to 4 "base" candles
Followed by 1 to 4 green "leg" candles
Followed by a "base" candle

Is there some code you can point me to that can satisfy the condition "if the next 1 to 4 candles are base, true but if it's 5, false"?

Steve