IFD Order (If-Done Order)
An IFD (If-Done) order is a conditional order that automatically places a secondary order (such as a stop-loss or take-profit) only after a primary order has been fully executed.
Quick Definition Box
An IFD order links two separate orders: the first must be filled before the second is even submitted to the market. This allows traders to automate entry and exit logic in a single instruction, reducing manual steps and emotional decision-making. The secondary order is typically a stop-loss or take-profit, but can also be a limit or market order.
Detailed Explanation
An IFD order is a two-part conditional instruction used in trading platforms. The name "If-Done" literally means: if the first order is done (filled), then submit the second order. Until the primary order executes, the secondary order remains dormant and is not visible to the market. This is distinct from an OCO (One-Cancels-Other) order, where two orders exist simultaneously and one cancels the other.
The mechanics are straightforward. Suppose you want to buy 1,000 units of EUR/USD at 1.0850, but only if the price first reaches that level. You also want to protect yourself with a stop-loss at 1.0800. Instead of placing two separate orders and hoping you remember to set the stop after the entry fills, you place an IFD order: primary = buy limit at 1.0850, secondary = sell stop at 1.0800. If the buy limit fills, the platform automatically submits the sell stop. If the buy limit never fills, the sell stop is never sent.
The secondary order can be a stop-loss, take-profit, trailing-stop, or even another limit order. For example, a trader might use an IFD to enter a breakout and then set a trailing stop. The key constraint is that the secondary order is only submitted after the primary fills — it is not active before that moment. This means there is a tiny gap between the primary fill and the secondary order being accepted by the broker, but in practice this is milliseconds.
IFD orders are particularly useful for traders who cannot monitor the market constantly. They combine an entry strategy with an immediate risk-management exit. However, they do not guarantee that the secondary order will be filled at the exact price specified — slippage can occur, especially in fast-moving markets or during news events.
Real-World Example
Let's use a concrete scenario with USD/JPY. The current price is 149.20. You believe that if the price breaks above 149.50, it will rally to 150.20. You want to buy at 149.50 (breakout entry) and set a stop-loss at 149.10 (40 pips below entry) to limit risk.
Without an IFD, you would need to:
- Place a buy stop at 149.50.
- Wait for it to fill.
- Manually place a sell stop at 149.10.
With an IFD order, you combine both steps:
- Primary order: Buy stop at 149.50, quantity 10,000 units.
- Secondary order: Sell stop at 149.10, quantity 10,000 units.
If the price rises to 149.50, your buy fills. The platform immediately sends the sell stop at 149.10. If the price then falls to 149.10, your position is closed with a 40-pip loss. If the price instead rises to 150.20, you could manually close for a 70-pip profit, or you could have added a third component (though most platforms only allow two orders in an IFD; for three, you'd need an IFD-OCO).
Now consider a take-profit variant. You buy EUR/USD at 1.0900 (market order) and want to take profit at 1.0950. You set:
- Primary: Buy market at 1.0900.
- Secondary: Sell limit at 1.0950.
The moment your market buy fills, the sell limit is placed. If price reaches 1.0950, you exit with a 50-pip gain. If price drops instead, you have no stop-loss — so you'd need to add that separately or use a different order type.
Why It Matters for Traders
IFD orders matter because they enforce discipline. Many retail traders enter a position and then delay setting a stop-loss, either out of hope or distraction. An IFD eliminates that delay by making the stop-loss conditional on the entry itself. This is especially valuable for breakout traders who enter on momentum — the stop-loss is already in place before the market can reverse against them.
Another practical use is for scaling in or out. A trader might use an IFD to enter a position at a limit price and simultaneously set a take-profit at a higher level. This automates the entire trade from entry to exit, which is useful for swing traders who cannot watch charts all day.
However, IFD orders are not a substitute for a full trading plan. They only handle the entry and one exit. If you need both a stop-loss and a take-profit, you would need an IFD-OCO (If-Done, One-Cancels-Other) order, which is more complex and not offered by all brokers. Also, the secondary order is not protected against gaps — if the market jumps over your stop price, you'll get the next available price, which could be worse.
Common Misconceptions
Misconception 1: "IFD orders guarantee my stop-loss will be filled at the exact price."
False. Like all stop orders, an IFD's secondary stop is a market order once triggered. In fast markets or low liquidity, slippage can occur. The stop price is the trigger, not the execution price.
Misconception 2: "The secondary order is active before the primary fills."
False. The secondary order is not sent to the market until the primary is fully executed. If the primary is partially filled (some brokers allow partial fills), the secondary may not trigger until the full quantity is filled, or it may trigger proportionally — this varies by broker.
Misconception 3: "IFD is the same as OCO."
False. OCO (One-Cancels-Other) places two active orders where filling one cancels the other. IFD places one order that, when filled, creates a second order. They are complementary — you can combine them (IFD-OCO) but they are not interchangeable.
Related Terms
How XM Compares
XM offers IFD orders on its MT4 and MT5 platforms, allowing traders to combine a primary entry order with a secondary stop-loss or take-profit. The exact availability and configuration may vary depending on the account type and the specific instrument. XM's platform documentation and support pages provide step-by-step instructions for setting up IFD orders. Traders should verify current order types and any platform-specific limitations directly on XM's official website or by contacting their support team, as features can change.
Compliance Footer
⚠️ This glossary entry is educational. Forex/CFD trading carries high risk. This is not investment advice.
See all glossary entries: /en/glossary