Issue the orders manually, gives more control over the orders sent. Try using the parent-child orders. It would be better if you could post a snippet of the code, for further analysis. Try reading the bracket order documention for manually issuing them.