HaParticipant
New
Hi,
How do you code a pullback that you limit a number of bearish candles? I looked in the library but can’t find anything I could modify…
Say, I look for stocks to trend above 20EMA then pulls back. Here, I want at least two red candles down but no more than five.
And how can I identify that swing high? I’d like to enter when this pullback breaks that swing high.
Thank you.
There you go:
Bearish = close < open
c1 = summation[5](Bearish)
c2 = summation[6](Bearish)
Cond = (c1 >= 2) AND (c2 = c1)
Cond, if true, grants that there have been at least 2 bearish candle, but not more than 5.