For(int I=0; I lt; OrdersTotal(); I )
OrderProfit() == TP)

//shut the order...
OrderClose(OrderTicket(), ...)