Most brokers' stop-out algorithms close positions in a specific order — typically largest unrealised loss first, or largest margin impact first — which means the trader's profitable positions can be closed while losing positions remain open. The hook is the trader's intuition that the broker should close the worst trade first. The broker's logic does not match.
US leverage transaction brokers must follow a specific liquidation order under 17 CFR §31.18(d): leverage contracts liquidated because of a margin deficiency must be liquidated in declining order of loss, commencing with the leverage contract with the greatest loss. That is the only legally-mandated order. It applies to leverage contracts at CFTC-registered brokers.
In practice, US brokers follow this rule. ESMA-regulated brokers in the EU are not bound by the same rule; their algorithms vary. Most major retail brokers close positions by one of three orders:
Each approach has a different outcome for the trader.
A trader running a portfolio of two positions — one profitable, one losing — may find that the broker's algorithm closes the profitable one first because it has the largest gain to lock in or the largest notional size. The losing position stays open and continues to drain equity. The trader wakes up to find their best trade closed and their worst trade still running.
This is the most common complaint in 2026 retail forums about stop-out behaviour. It is not a bug. It is the algorithm doing exactly what it was designed to do, which is reduce used margin as quickly as possible. The trader's preference — closing the worst trade first — would reduce used margin more slowly and leave the broker exposed to additional loss.
| Algorithm | First position closed | Trader outcome |
|---|---|---|
| Largest loss first | Worst trade | Trader preference; slow margin reduction |
| Largest margin impact first | Largest position | Trader's profitable position may close |
| Largest notional first | Biggest trade | Trader's profitable position may close |
The CFTC rule mandates the first approach in the US. ESMA does not mandate any specific order, and brokers choose based on their own risk model. Traders who want to predict which position closes first need to know the broker's algorithm.
Three practical adjustments:
Once the broker's algorithm begins closing positions, the trader is in observation mode. The broker submits market orders for each position in sequence, and each fill updates the account equity. The process continues until either:
For a trader with negative balance protection, the process stops at zero equity. For a trader without protection, the process continues until all positions are closed and any deficit is calculated.
A small number of 2026 retail brokers offer an automatic stop-out prevention feature: when margin level falls to a threshold the broker sets, the system automatically closes the trader's worst-position trade rather than running the broker's algorithm. The feature costs nothing at most brokers and provides the trader with more control over which position is closed first. The trader still loses the trade, but the loss is on the worst-position trade, not the best.
This feature is not universal. Traders who want it should ask the broker before opening the account.
The 2025 Finance Magnates analysis cited in retail coverage found that market makers executed 78% of stop-losses at worse prices than the trigger level, while only 43% of limit orders received price improvement. The same dynamic applies to stop-out fills: the broker's market orders during a fast close often fill at the worst price of the stop-out sequence. The trader should expect the stop-out to be more expensive than the displayed level would suggest.
Scalping Forex Risks: 11 Hidden Dangers discusses the stop-out algorithm and the typical position-selection logic. The video is third-party; the controlling source is the broker's client agreement.
Checked September 2026. Broker stop-out algorithms vary and may not be publicly disclosed. The CFTC rule applies to US-registered leverage transaction merchants; ESMA does not mandate a specific order. The figures above reflect typical broker practice in mid-2026.