I'm having a tough time getting this figured out.
Basically I have an indicator I'm trying to make a condition for bullish vs bearish.
The components are a channel and a moving average, and I want to have the crossover(sma, lower_bound) make the bullish condition true until the moving average crosses above the upper bound and have the bearish condition become true on crossunder(sma, upper_bound)
I have attempted a few different ways but what ends up happening is that the bullish condition only occurs on the crossover bar and doesn't persist until the crossunder.
TLDR I need to make a one time condition (cross) turn a state on and continue until a different cross turns it off.
thanks in advance