I am trying to enter a strategy after "X" consecutive bars.
greenCandle = barstate.isconfirmed and (close > open)
G = input(11, minval=1)
strategy.entry("buy", true, 1, when = greenCandle[G] and close[0]>open[0])
This gives me an entry 11 bars after the green but does not give me an entry after 11 consecutive greens.