How Does Trading System Order Execution Handle Partial Fills on Large Orders?

Listen to this article

How does trading system order execution handle partial fills on large orders? Most retail traders never ask, because at 0.1 lots the question never comes up. Scale up to 20, 50 or 100 lots on a single click and it becomes the question that decides your real entry price. The visible top-of-book quote rarely covers that much size. Something has to give.

What gives is the fill. Your order gets split, partially executed, rejected or swept through several price levels. Exactly which one happens depends on the fill policy you send, how your broker aggregates liquidity, and how your platform reports what happened. Get any of those wrong and your Expert Advisor may think it holds a position it doesn’t have.

This article covers the mechanics end to end. That means fill policies, the FIX messages behind them, how liquidity providers decide what to fill, and the defensive code your automated system needs. I have no patience for vague answers here, and you shouldn’t either.

Table of Contents

  • What a Partial Fill Actually Is
  • Fill Policies: FOK, IOC and Return
  • How Does Trading System Order Execution Handle Partial Fills on Large Orders?
  • Liquidity Models: Sweep-to-Fill vs Full Amount
  • Building Partial-Fill Logic Into Your EA
  • Choosing Your Route: Practical Recommendations
  • FAQ

What a Partial Fill Actually Is

A partial fill happens when the execution venue matches only part of your requested volume. Say you request 50 lots. The venue fills 30, and the remaining 20 are either left working, cancelled, or filled at a worse price. This is not an error state. It is how market structure works when liquidity at a price level is finite.

In FX the problem is subtler than on an exchange. There is no central order book. Your broker sees a stack of quotes from several liquidity providers (LPs), and each quote comes with a size attached. A typical EUR/USD quote might show:

  • LP A: 1.08502 for 5 million
  • LP B: 1.08503 for 3 million
  • LP C: 1.08505 for 10 million

A 10-lot order (1 million) fits easily inside LP A’s tier. A 150-lot order (15 million) does not. It has to consume LP A, LP B and part of LP C, or wait, or be cut short.

Why size changes everything

Quoted size is also conditional. Under last look, an LP can reject a trade during a short hold window after receiving it. Large orders are more likely to be rejected because they carry more adverse-selection risk for the LP. The FX Global Code (Principle 17) governs how last look should be disclosed and applied. Read it. It explains a lot about why fills on size behave the way they do.

A forex trading system's monkey looking at the camera with a calm expression, and a forex trading chart in the background

Fill Policies: FOK, IOC and Return

Every order carries an instruction telling the venue what to do if full size isn’t available. This is the time-in-force or filling policy. Most traders leave it on default, and that is a mistake on large tickets.

The three core policies

  • Fill or Kill (FOK): fill the entire volume immediately, or cancel all of it. No partials. You either get 50 lots or nothing.
  • Immediate or Cancel (IOC): fill whatever is available right now and cancel the rest. You might get 30 of 50 lots, and the other 20 vanish.
  • Return / Good-Till-Cancelled remainder: fill what’s available and keep the unfilled remainder working as an order. This is common on exchange-traded instruments and less so in FX market execution.

In MetaTrader 5 these map to ORDER_FILLING_FOK, ORDER_FILLING_IOC and ORDER_FILLING_RETURN. The broker’s symbol settings decide which ones are allowed. Send an unsupported mode and you get an “unsupported filling mode” rejection (retcode 10030). Always query SYMBOL_FILLING_MODE before you send.

Which one protects you?

It depends on what you fear more: not trading, or trading the wrong size.

  • Use FOK when position size is part of the strategy’s maths, for example a hedge that must offset an exact exposure.
  • Use IOC when getting some exposure beats getting none, such as momentum entries where waiting costs more than partial size.
  • Use Return only when you have the logic to manage a resting remainder properly.

How Does Trading System Order Execution Handle Partial Fills on Large Orders?

Now the mechanics. Between your platform and the LPs there is almost always a FIX connection. The FIX Protocol standard defines how fills are reported, and once you understand it, partial fills stop being mysterious.

The execution report sequence

Every fill event produces an Execution Report (MsgType 35=8). The fields that matter:

  • OrdStatus (39): 1 = Partially Filled, 2 = Filled, 4 = Cancelled, 8 = Rejected.
  • LastQty (32) / LastPx (31): size and price of this specific fill.
  • CumQty (14): total filled so far.
  • LeavesQty (151): volume still open on the order.
  • AvgPx (6): volume-weighted average price across all fills.

A 50-lot IOC buy swept across three LPs might generate three reports. The first shows 20 lots at 1.08502 with OrdStatus=1. The second shows 15 lots at 1.08503, still status 1. The third shows 10 lots at 1.08505 with LeavesQty=5, then a final cancel for the unfilled 5 lots. Your platform aggregates these into one deal, or several, at an average price near 1.08503.

What the bridge does

Retail brokers sit behind a bridge or aggregator (oneZero, PrimeXM, Gold-i and similar). The bridge decides how to split your ticket. Common approaches include:

  1. Best-price sweep: consume the best-priced tiers in order until volume is met.
  2. Pro-rata split: divide the order across LPs in proportion to their quoted size.
  3. Single-LP routing: send the full ticket to one LP whose tier covers it, accepting a wider price.

Then the bridge reconciles everything into what your MT4/MT5 or cTrader account displays. On a netting account you see one averaged position. On a hedging account you may see several separate positions, one per fill. That difference matters to any EA that counts tickets.

Liquidity Models: Sweep-to-Fill vs Full Amount

How LPs price size determines whether you get partials, slippage, or both. There are two dominant models, and you should know which one your broker uses.

Sweep-to-fill

Your order walks the book, taking each price tier in turn. You get the best price available on the first slice and progressively worse prices after that. This is fast and transparent, and partial fills are routine.

  • Advantage: tight top-of-book pricing for small orders.
  • Disadvantage: on size, you may trigger last-look rejections on individual tiers, leaving holes in the fill.
  • Result: more partials and more fragmented execution reports.

Full amount

The LP quotes a single all-in price for the entire size. A 15-million quote is one price for all 15 million. No walking the book.

  • Advantage: one fill, one price, and no partials by design.
  • Disadvantage: the quoted price is wider, because the LP prices in the risk of the whole ticket.
  • Result: cleaner execution and lower information leakage, at a visible spread cost.

Institutional desks increasingly prefer full-amount pricing for large tickets. It removes the signalling problem: a sweep hits several LPs at once, all of whom then know someone is buying size. That information leaks into the market and moves the price against you before the order finishes. Some industry analyses estimate this market impact costs more than the spread difference itself on tickets above roughly 10–20 million.

Building Partial-Fill Logic Into Your EA

This is where most automated systems fail. The typical EA sends an order, checks that the retcode equals “done”, and assumes the full volume was executed. That assumption breaks the moment liquidity thins out at 22:00 GMT rollover or during a news spike.

Mandatory checks

  • Compare requested vs executed volume. In MQL5, check result.volume against request.volume. Retcode 10010 (TRADE_RETCODE_DONE_PARTIAL) explicitly signals a partial fill.
  • Recalculate risk from actual size. Stop-loss distance was sized for 50 lots. If you got 30, your risk-per-trade is now different. Decide in advance whether that is acceptable.
  • Reconcile against the server, not local state. Query open positions after every execution. Never trust an internal counter alone.
  • Handle multiple tickets on hedging accounts. One logical trade may become three positions. Tag them with a shared magic number and comment.

Remainder strategies

Once you know you’re short of target volume, you have four options:

  1. Accept: trade the partial size and move on. This is simplest and often correct.
  2. Retry immediately: resend the remainder as IOC. You risk chasing price.
  3. Retry with a limit: resend the remainder with a maximum deviation. If price has moved beyond your tolerance, stop.
  4. Unwind: close the partial if the strategy requires full size to be valid.

Avoid the problem upstream

The best partial-fill handling is not needing it. Slice large orders yourself.

  • TWAP: split the order into equal child orders over a fixed time window.
  • VWAP: weight child orders by expected volume profile, heavier during the London/New York overlap.
  • Iceberg: show a small visible size and refill it as each slice executes.

A 100-lot entry split into ten 10-lot IOC orders, two seconds apart, almost always executes better than one 100-lot market order. Backtest the difference with realistic slippage modelling. The improvement is usually obvious.

Choosing Your Route: Practical Recommendations

Theory is useless without a decision. Here is how I would approach it, by trader profile.

Retail EA trader (under 10 lots per ticket)

  • Partial fills are rare at this size on majors. Use the broker’s default fill mode, but code the volume check anyway.
  • Avoid trading size into rollover or major data releases. Liquidity collapses and spreads widen five to ten times.

Prop or high-volume trader (10–100 lots)

  • Ask your broker directly: sweep or full amount? Last look or firm liquidity? What is the hold time?
  • Default to IOC with slicing. FOK on size gets rejected often enough to cost you opportunities.
  • Request execution reports or a TCA (transaction cost analysis) summary. Serious brokers provide them.

Institutional or fund size (100+ lots)

  • Use full-amount liquidity or an algorithmic execution service from your prime broker.
  • Measure implementation shortfall: arrival price versus average fill price. That number is your real execution cost.
  • Rotate LPs based on fill ratio and reject rate, not headline spread alone.

One rule applies to everyone. Headline spread is marketing. Fill ratio, reject rate and average slippage on your size are reality. Measure those.

FAQ

Do partial fills happen on retail forex accounts?

Yes, though rarely at small sizes on major pairs. They become common above roughly 20–50 lots, on exotic pairs, and during low-liquidity periods such as rollover or news releases.

Is a partial fill the same as slippage?

No. Slippage is a price difference between requested and executed price. A partial fill is a volume difference. Large orders often suffer both at once, because sweeping deeper tiers fills at worse prices.

Which MT5 filling mode should my EA use?

Query SYMBOL_FILLING_MODE first and use only supported modes. IOC suits most strategies. FOK suits strategies where exact size is essential. Always handle retcode 10010 for partial execution.

Does last look cause partial fills?

Indirectly, yes. When an order is swept across several LPs, one LP may reject its slice during the last-look window. The other slices still fill, leaving you with less volume than requested.

Is full-amount liquidity always better for large orders?

Not always. It removes partials and reduces information leakage, but the quoted spread is wider. For moderate sizes in liquid sessions, a well-sliced sweep can be cheaper overall.

Conclusion

So, how does trading system order execution handle partial fills on large orders? It depends on three things: the fill policy you send (FOK, IOC or Return), the liquidity model behind your broker (sweep-to-fill or full amount), and how your platform reports FIX execution events back to your account. None of these are hidden if you know where to look.

The practical takeaways are simple. Check executed volume on every order. Recalculate risk from actual size. Slice large tickets instead of firing them as one block. And interrogate your broker about last look and fill ratios before you scale up. Do that now, before your next large ticket teaches you the lesson more expensively.

Test Your Knowledge
1. Under an Immediate or Cancel (IOC) policy, what happens to a 50-lot order when only 30 lots are available?
2. In a FIX Execution Report, which field shows the volume still open on an order after a partial fill?
3. According to the article, what is the main trade-off of full-amount liquidity compared with sweep-to-fill?


Take a Random Walk
Not sure what to read next? Pick a level for a random article you haven't seen yet.