When an order can't be filled completely at the requested price, the fill policy decides what happens next. Three terms come up often.
Fill or Kill means the whole order must fill immediately, or it is cancelled. All or nothing. Immediate or Cancel fills as much as possible right now and cancels the rest. Return allows partial fills and leaves the remainder as a pending order.
Which one works depends on the strategy. A scalper who needs a precise position size may prefer Fill or Kill, accepting the occasional rejection. Someone who wants whatever is available at the price might choose Immediate or Cancel, though the resulting smaller position needs managing. Return suits larger orders in liquid markets, but can leave orphaned pieces.
Not every broker or platform offers every policy, and the default may not match the intention. Some platforms silently choose one for each instrument, and it shows up in the symbol specification as the allowed filling modes.
Checking the settings and testing on demo avoids confusing partial positions.
Checking the symbol specification usually reveals which filling modes the broker allows for each instrument. Some brokers allow only one mode on certain instruments, and an EA that assumes another will fail with a cryptic error.
Automated strategies should read the allowed modes at start-up and choose accordingly, instead of hard-coding one. That small piece of defensive coding avoids a surprising number of order rejections when a strategy is moved to a new broker or instrument.
Which fill policy is in use, and what happened when the default turned out to be different from expected?
Fill policies in plain words: FOK, IOC and Return
-
Shadow Trader
- Posts: 5438
- Joined: Wed Sep 09, 2026 5:19 pm