Automatic closure of open orders can occur in the case of:
Stop out
The most common cause of orders closing automatically is stop out, which is the automatic closure of positions when the margin level of a trading account hits its stop out level. The stop out level is set to 0%* for all account types by default, but you can set a custom stop level for your trading account.
By default when the margin level reaches 0%, stop out occurs since 0% is the stop out level.
Knowing how to calculate your margin level can help you anticipate your stop out level:
Margin level = (Equity / Margin) x 100%
An example of stop out in action:
If you have multiple open orders, then stop out will close orders starting with the least profitable ones until the margin level is returned above 0%.
A trading account’s equity is USD 50 and margin USD 10, therefore the margin level is 500%. (50/10 x 100 = 500%)
- Loss drops equity to USD 6, with margin USD 10.
- 6/10 x 100 = 60%
Not enough yet to trigger a stop out. - More loss drops equity down to USD 1, with margin USD 10.
- 1/10 x 100 = 10%
Still not enough for a stop out, but the trading account will receive a margin call. - Finally equity drops to USD 0 with margin USD 10.
- 0/10 x 100 = 0%
Now a stop out occurs, closing this order automatically.
If you have multiple open orders, then stop out will close orders starting with the least profitable ones until the margin level is returned above 0%.
*Note that for Stocks during daily break hours, the 0% stop out level is adjusted to 100% which automatically closes any open orders.
Stop Loss (SL) and Take Profit (TP)
Stop Loss and Take Profit are types of pending orders that can automatically close orders when an order reaches a level of loss or profit defined by the trader. Trailing stops are a type of pending order that change the level of SL as an order’s price updates. SL and TP don’t happen without being set by a trader for new or existing orders.
We recommend following the link for a more in-depth look at pending orders if this interests you.