Guessing and assuming is no good when you develop a system - you need to definitely _know_ what your script is doing. For this you have the log. Just compare the logs of different script versions and you can see immediateley how and why your script changes affect the single trades.

As you see, the order of long/short can heavily affect performance unless your trades are really independent. But this is not the case here due to your hedge setting. Orders can not "compete", but spread losses by netting always depend on which order comes first.