When trading on margin, please consider that the position may be closed in two cases:
By the user personally.
Automatically by the system.
If the user closes the position, the order will be completed under the market conditions at the moment of the closure.
If the position is closed automatically, here are some things to consider:
The orders are completed based on the order book, so the shift in market impacts the closure of position.
Sometimes, if the position is auto closed, it may be closed by separate market orders. It is highly probable if the price approaches fast liquidation.
So, it may happen that user’s position may have already been partially completed, and the benefits from the activity may appear lower than expected.
Let's consider an example: user has opened a long position for 9 ETH with the margin 3, the stop loss of $810 and the open price of $1,102. The price is dramatically going down and safety mechanism determines that there is a high probability of price dropping even lower. So, 5.5 ETH are sold for at $950. The position then stays open with 3.5 ETH.
When the market is very volatile, this system is necessary to ensure the minimum loss to the users.