What comes first: tick or stop loss?

 

I think I know the answer to this already but am looking for confirmation:

What happens on an incoming tick (in regards to code); will the stop execute first on the trade and then the code is executed, or the other way around?

 Any links to "what happens on an incoming tick" will be very helpful.

 

Cheers 

 
winterz:

I think I know the answer to this already but am looking for confirmation:

What happens on an incoming tick (in regards to code); will the stop execute first on the trade and then the code is executed, or the other way around?

 Any links to "what happens on an incoming tick" will be very helpful.

 

Cheers 

The broker process the stoploss and send the tick, so the stoploss should be processed first, and with a latency you will receive the tick.
 
thank you!