Adding stoploss and target to trading system

Hi I'm new to afl coding. I have a trading system. And i want to add stoploss and target. Code is taken from algomojo. And i also want to use algomojo smart option module over that code later.
Requirement is -
  1. stoploss - when buy trade is ongoing and we are in loss and candle close below ema 15 and red then only stoploss hits. Same above ema open and green candle for short stoploss.
  2. 1st target - for buy side candle open below ema 20 and red . Same for sell side, candle open above ema 20 and red.
  3. 2nd target - when buy default trading system givs exit.
  4. manual square off all position button on screen.
  5. backtastebale.
please help me.
I'm totally new and need this modification.
I'm really thankful in advance.
I know this will take time, but plz do it for me.


Similar threads