A stop order is used as the trigger function when there’s a need to place a buy or sell orders at specific market conditions. Usually, traders as use it as a risk management tool, when the market goes against or in favor of them. This type of orders is executed when the price movement hits a specific stop mark, whether it’s intended for buy/sell orders.
For example, if you decide to open a sell position at $5150, setting a stop order at $5250 in case the market goes against you. If the price goes up and reaches $5250, then your stop order gets automatically executed and you buy back at $5250, saving your deposit from harsher losses.
The same principle applies when you try to enter into the buy position, fulfilling an order at $5100 and setting the stop at $5000. Let’s suppose the market goes against your position reaching $5000, then your stop gets automatically triggered again, selling the position amount at current market conditions.