buggy mlq4/backtester?

 

I have a trade system in which when one trade hits its Stop loss (SL) another trade hits its Take Profit (TP) - so they should both close at exactly the same price, one via SL and the other via TP

SL price of trade 1 == TP price of trade 2.

e.g. 75.02 == 75.02

This happens ok most of the time in backtesting but SOMETIMES the backtester will close the trade 1 by SL and NOT the trade 2 by TP. Why? How can this be? They should both close. How can one close and not the other? - when they both have the same closing price (one takes a TP on this price, one takes a SL on this price). Could it be that the backtester just gets things wrong sometimes?

 
Spread, spread and again spread! closing price for buy and sell trades is not the same, if price does not move at least the spread distance above/under the stoploss, the takeprofit will not trigger.
 
The sell SL triggers at the Ask, the buy TP triggers at the Bid. Assuming they're both the same value, first the SL triggers, then the price has to rise by the amount of the spread before the TP will.
Reason: