← All articles

What happens to your stop when an order fills in pieces?

Follow recorded simulated fills to see why requested quantity, open position size, and remaining stop quantity must be checked separately.

AutomationPublished By Stratifyre

Topics

Partial fillsOrder protectionRisk management

An order to buy ten shares is not a ten-share position until all ten fill. A request to sell four is not a four-share reduction until that sale fills. A protective stop needs to stay connected to the exposure between those events.

That is easy to miss when a report shows only the finished trade. The useful question is: after this fill, how many shares are still owned, and how many can the working stop close?

We ran Stratifyre’s simulated broker locally with invented prices and volumes to inspect that sequence. The quantities below came from the running software; this was not a hosted account, historical market backtest, or test of a real broker.

Keep three quantities separate

For a single long entry, track:

  • Requested entry quantity: how much the original order asked to buy.
  • Remaining position: cumulative entry fills minus confirmed exit fills belonging to that entry.
  • Working stop quantity: how much remains executable on the active protective order.

In this example, the stop is the only protective exit. After each fill and confirmed stop update, its remaining quantity matches the shares still held. A smaller stop would leave some shares outside that stop; a larger sell quantity could be rejected or sell too much, depending on the broker’s rules. Other pending exits can change how a broker allocates the quantity available to close, so compare the confirmed orders together.

Also separate an order’s recorded total quantity from its remaining executable quantity. A filled six-share stop may continue to show quantity: 6 in order history. It has no shares left to sell; it is not a new six-share sell order waiting to trigger.

A ten-share entry filled in three pieces

We submitted a market order to buy ten whole shares of an invented USD stock. The simulation filled two shares, then three more, then the remaining five. We controlled the available volume to create those partial fills; this is a recorded example to read, not a sequence to force through your own broker. Commission and the modeled slippage adjustment were both zero.

The submission mark was $100. The first actual fill was $101. The initial stop was configured three percent below the first fill, so its trigger was $97.97. Using the earlier $100 submission mark would instead have given $97.

The original buy quantity stayed ten throughout. Protection grew with filled exposure, rather than treating the unfilled entry remainder as shares already owned.

Submitting a trim did not shrink the position

After all ten shares filled, we submitted a market sell for four with the simulated price at $110. We inspected the state before allowing another fill. The sell was submitted, but the position was still ten shares and the stop still covered ten.

Only after the four-share sell actually filled did the position and stop both move to six. The stop price remained $97.97; reducing quantity did not itself request a different stop price.

A submitted trim is not a completed reduction

Sell four submitted

10 sharesStill owned

Working stop: 10

Sell four filled

6 sharesStill owned

Working stop: 6

Count the sale when it fills, not when you submit it.

Two recorded checkpoints from the local simulation on November 9, 2026, using invented prices and volume. This is an explanatory comparison, not a product screenshot.

For this controlled example, the arithmetic was 10 entry fills − 4 exit fills = 6 remaining. In a busier account, establish which entry each exit belongs to before doing that subtraction. A symbol-level position can contain several entries with different stops; the total alone does not tell you which entry and linked stop an exit should reduce.

The stop trigger was not the exit price

Next, we moved the synthetic price directly to $97 and supplied enough volume for the remaining six shares. The stop triggered and the actual exit fill was six at $97. No shares remained, and the linked stop was finished.

The stop field still recorded $97.97. That was its trigger, not the fill price. Relative to selling those six shares at the trigger, the observed gap cost another 6 × ($97.97 − $97) = $5.82, before any costs. This is arithmetic from the recorded simulated fills, not a prediction of live slippage.

The simulator added no slippage adjustment to the $97 market price. The worse exit arose because the next supplied price was already below the $97.97 trigger.

The demonstrated order was a stop-market order, which becomes a market order when triggered; a market order does not guarantee its execution price. The deliberately discontinuous synthetic price path makes that distinction visible without claiming to model a real order book. Investor.gov: Types of Orders.

Check the broker’s actual protection contract

Do not assume the first partial fill activates exits on every bracket implementation. Alpaca’s documentation, for example, says its native bracket exits activate after the entry is completely filled; it separately describes reducing the stop quantity when a take-profit leg partially fills. Those are different transitions from the independent market trim in this local demonstration. Alpaca order documentation.

The simulation used an entry-owned managed stop with no take-profit sibling. It did not test a native broker bracket, external manual orders, simultaneous exit races, disconnect recovery, or another account mode. This example establishes the local simulated path; it does not establish availability for your broker or account.

Before relying on a paper workflow, identify when its linked stop becomes active, how partial exits change the shares it can still sell, and what confirms that a replacement or cancellation finished. A submitted request alone answers none of those questions.

Read the record before trying another trade

Start with the completed example above. At the “Sell four submitted” checkpoint, write down the shares still owned and the shares the stop can sell. Repeat after the sale fills, then after the stop fills. The answers are 10 and 10, 6 and 6, then 0 and 0. The request alone changes neither quantity.

Now check the final order history: the stop, ord-2, still records a quantity of six, but its status is filled and its filled quantity is six. Nothing remains available to sell. That status check is what prevents a historical order from being mistaken for active protection.

Copy this short record for any checkpoint you want to explain. Enter cumulative fills up to that point and the stop quantity still executable:

Checkpoint:
Entry fills:
Exit fills:
Shares remaining:
Linked stop ID:
Stop status:
Stop can sell:
Result (pick one):
[ ] explained
[ ] unresolved
[ ] untested

For the completed trim in this example, entry fills total ten, exit fills total four, and six shares remain. Stop ord-2 has status new with six shares still executable: explained. This equality applies to the demonstrated single entry with one stop; other pending exits require checking how the broker shares the available closing quantity.

For a paper trade of your own, use whatever order and fill records your provider makes available. If they do not identify the linked stop and its remaining quantity, mark protection unresolved, not verified. If no partial fill occurs, leave partial-fill handling untested; a fully filled trade cannot answer that question. This article does not establish a customer interface for reproducing the controlled sequence above.

Use the backtest-to-paper checklist to prepare that later paper review. Related reading: the position-sizing guide explains how an intended loss budget differs from the cash allocated to a position.

Test the rules before you automate them

Run the setup against historical data, then inspect the trades behind the result.

Create Your First Strategy

$50 in free credits

For eligible new accounts. Terms apply.