How are stop market orders executed when testing on one hour timeframe ?  In my opinion it's supposed to execute very close to the stop price with a random slippage if possible.  However, I don't see this happening exactly.

See attached for a simple strategy that updates the stop loss every bar.

I'm using Lean from Visual Studio and using the results json file to plot the orders as well as the stop loss line.  See below for three examples.  The red arrow is where the order was filled.  In the first two examples the order was filled relatively close to the stop loss line, however, the last example seem to get filled on the close of the candle and not at the stop loss line.  I cannot share all the orders here as there are too many screenshots and unfortunately online platform cannot plot orders to this detail.