Today, I had the unfortunate experience of finding out that trades closer to price are not necessarily executed before trades that are further away from price.
The scenario was that I had entered a long position, set up a limit profit target, and then set up smaller short positions between my long entry and my limit profit target. This was done to allow me to take partial profits on my trade (via net off positions), and then eventually exit the position with my final limit order. Price, however, moved violently through both of my smaller profit targets and through my final limit order within a matter of seconds. But to my surprise, my limit order executed first (despite it being much further away from the previous price than my two lower shorts). I then had two new short positions opened at the levels I had set, which of course placed me into not just one, but two heavy loss positions.
Is this a bug? Is this behaviour documented anywhere? These are some very unexpected execution orderings by this broker, and I'm quite unhappy about it.