Gap on Stop loss

Today i made an great mistake, i made an order with wrong lot, but for my lucky i got some winning pips and set my SL to break even. Buy my sl(be) was blowed by a gap, the sl was 2.1978(sell order) but have closed on 2.2111 becouse the gap.
Im programmer and think, if GAP > Stop Loss, so close on 2.1978 not in 2.2111.

This is right?