My code is currently in OnBarUpdate, and will split my total lot size between the two orders. It send the request for the first which is a market order using a unique name and lot size, then starts requesting the second one. However, in live markets, it seems that it sends the request of the first and it manages to continue with the code to start the second request before it fills the first. That causes issues as it is trying for multiple entry orders at the same time. So it changes my entry order for the first one and overwrites it with the second.
I know it has been suggested from support that in order to have multiple targets one needs to have separate entries, so how should I go about structuring this?

Comment