Spread in MT5

 
The stop loss got triggered despite the price not touching it. I make an exit on ask and bid prices only + they are market order, the only way this stop loss getting triggered without touching it is through the widening of spread but this is in 15m timeframe and the gap is too huge. This trade is an exception to all other trades, so i know there is not a mistake in my code's logic. What would be the possible explanation for this?
 
Renz Carillo :
The stop loss got triggered despite the price not touching it. I make an exit on ask and bid prices only + they are market order, the only way this stop loss getting triggered without touching it is through the widening of spread but this is in 15m timeframe and the gap is too huge. This trade is an exception to all other trades, so i know there is not a mistake in my code's logic. What would be the possible explanation for this?

Download and check all ticks - check what the prices were at the time of closing the position.

Downloading price history

Market Watch - Trading Operations - MetaTrader 5 Help
Market Watch - Trading Operations - MetaTrader 5 Help
  • www.metatrader5.com
The Market Watch window provides an overview of price data of financial instruments: quotes, price statistics and tick chart. It also provides...