Your stop loss or take profit was a MARKET order. A market order does not allow specification of the execution price. When the trigger was reached, the order instructed the exchange to fill your desired quantity, scraping the order book. If the order book was wide at that time, the actual execution price may be very different from the spot or mark price, thus changing your profit or loss.
Updated over a year ago