Back to the OP. If there is a Sell restriction, you cannot sell. It does not matter if you have a position. Likewise with a Buy restriction (more rare). Think of it as a partial halting.
There are steps that have to occur for an order to fill and along the way things can happen. Orders can be rejected by the broker (margin, frozen account), by the exchange (restrictions, halting, lock limits), and then the order has to get matched up (last in que, disorderly market, illiquidity). Please understand this before it costs you too much "education".
These are ONLY a few things, and there are more. Also when these things happen, things usually are a bit "crazy". We are not even getting into options , bonds, forex, swaps, etc. Others can add to the list.
Here is an example one might get into:
- You go long a stock @ 2.00 for 4000 shares.
- News is released, BAD news.
- BEFORE a sell restriction or halting, you put in SELL MKT, 2000 shares.
- Your order is accepted, but just 1/2 a second before, some larger entity put in a MKT sweep to fill SELL order to sell 2 million share.
- Another entity also has an MKT order for another 1 million same order type, 1/4 second before you.
- Now the stock tanks to 0.30, as you see it. But along the way the first 2 million market had trouble filling.
- It partial fills, then stops filling, partial fills again, stops filling again.
- Ditto with the next million shares, but it stops with 10% not filled.
- Now people see this, and there are literally no Bids, no buyers at 0.30.
- The stock halts.
- Your order did not fill and you are locked out.
And a variant, what if you get margin called and the stock is halted?
Again, this has to be in your plan otherwise you are just another newbie. There are many ways to mitigate this risk.