Opening of opposite positions

My trading bots sometimes seem to open opposite positions (short when the bot is going long) upon a deal closing. It never marks that it is doing this nor can I seem to find the feature responsible for this. Any ideas?

Can you share the bot URL? We will check the logs.