This may give you some idea: http://fxdreema.com/shared/mvDMmzTK
When a new sell trade is opened (detected with block 3), we load every buy trade (well, it is only one, with block 7) and modify it's SL with the TP attribute of the trade that caused the "on Trade" event.