I am triggering two separate alertconditions (when a crossover and crossunder happens)
They cross over a few time after this alert and this trigger it multiple times. I'm hoping to set a condition so that once they've done it once it no longer triggers the alertcondition until the other alertcondition is triggered
aka alertcondition(long...) is triggered once only even if its conditions happen again but the condition is reinstated after alertcondition(short...) is triggered and vice versa
long = crossover(RSIMain,SellAlertLevel)
short = crossunder(RSIMain,BuyAlertLevel)
alertcondition(long, title='BUY', message='BUY!')
alertcondition(short, title='SELL', message='SELL!')
plotshape(long, style=shape.arrowup, text="Long", color=green, location=location.belowbar, size=size.auto)
plotshape(short, style=shape.arrowdown, text="Short", color=red, location=location.abovebar, size=size.auto)
isLongOpen = false
isShortOpen = false
then at the bottom of code:
if (long)
isLongOpen := true
isShortOpen := false
if (short)
isShortOpen := true
isLongOpen := false
alertcondition((long and not isLongOpen), title....)
plotshape((long and not isLongOpen), title....)

