This is an EA compose of EMA, PAR and CCI.
First, when EMA21>=EMA50, CCI>=100 and PRICEx>PAR will trigger a BUY. STOPLOSS will be once price touches EMA50.
When stoploss occur, i want to have another order that EMA21>=EMA50,PRICE=>PAR and PRICE cross above and close above EMA21 and trigger a BUY on the next candle. STOPLOSS will be at EMA50, too.
And only one position will be made at a time. If the first condition trigger a buy and the stoploss does not occur, even the second condition is met, it will not trigger another buy.
Both closed condition will be PRICEx<PAR.
Could someone help me to modify and link please.
Thank you very much.