Auto trade is not calculating the total amount properly.
Please refer to attached save, I can just keep on clicking the auto trade button and my money keep on increasing on each cycle that it sells all my gunpoweder and buy them back.
If you manually sell 10200 gunpowder it will yield around 2990, and buy 10200 it will cost around 3300, which it should be a loss. But with auto trade these gunpowder can be sold for around 3770 and costs only around 2200.
Please refer to attached save, I can just keep on clicking the auto trade button and my money keep on increasing on each cycle that it sells all my gunpoweder and buy them back.
If you manually sell 10200 gunpowder it will yield around 2990, and buy 10200 it will cost around 3300, which it should be a loss. But with auto trade these gunpowder can be sold for around 3770 and costs only around 2200.