move take profit and stop loss in EA

 

What is the code that moves the take profit and stop loss when a 2nd order opens and the take profit approaches closer to the 1st and the 2 are together.

Example: TP: 10 SL:50

Open 2nd order 20 pips this take of 1st comes to the same position as 2nd and so on.


Attached example

Razão: