I'm trying a strategy with rising and falling function where: if there were 3 consecutive lower low (falling) and current low is higher (rising) then BUY. if there were 3 consecutive higher low (rising) and current low is lower (falling) then SELL. But the AND condition never trigger. Can you point it out to my why?
//@version=4
study(title="RiseFall", overlay=true)
TrendPrd = input (defval=3, title="Trend Period", type=input.integer, minval=3, step=1)
ChangePrd = input (defval=1, title="Change Period", type=input.integer, minval=1, step=1)
Fall2Rise = falling(low, TrendPrd) and rising (low,ChangePrd)
Rise2Fall = rising (low, TrendPrd) and falling(low,ChangePrd)
plotshape(Fall2Rise, title="BUY", style=shape.labelup, location=location.belowbar, color=color.black, transp=0, text="BUY", textcolor=color.white, size=size.tiny)
plotshape(Rise2Fall, title="SELL", style=shape.labeldown, location=location.abovebar, color=color.black, transp=0, text="SELL", textcolor=color.white, size=size.tiny)
It should have worked here as captured. enter image description here