AFL Code for failed breakout condition

#1
Hi,

I was trying to develop Buy Sell system for failed breakouts. Condition should be something like this:

1. Price opens above/ goes above certain important price level, say EMA 34
2. If Price falls back below certain level, say EMA 21 after going above EMA 34, then give a sell signal (down arrow) and vice versa.

For sell signal, it should check only previous crossing of price above the EMA 34.

Can anyone help me with the code?

Rythm
 

Similar threads