Help me!!! I'm newbie. set new order like the

 
 I'm have 10 order. 1 of them close and I want set a new order like the order close( volume, price, sl, tp ). i try some way but it don't like what i want. Can you help me code this or show me the best way to do, please. I'm a newbie so something i can't understand, can you show it clearly. Thank a lot!