Jurisdiction: primarily United States (NFA-regulated retail forex). Note: Broker-specific implementation, platform behavior, and rule text can change. Verify the current rule text directly against the NFA’s own rulebook and your broker’s written trading conditions before relying on any specific detail below.
FIFO means “First In, First Out.” In trading, it generally means that the oldest eligible position or tax lot is closed or treated as sold before newer ones. In US retail forex, FIFO commonly refers to rules governing how offsetting transactions in the same currency pair are closed. In stock and other investment accounts, FIFO may instead describe a cost-basis method for deciding which purchased units were sold. These are related ideas, same principle, oldest first, but they’re legally and operationally different things, which is exactly where a lot of confusion around this topic starts.
That’s the short version. The rest of this article separates the two meanings properly, walks through how the forex version actually works for US accounts, and covers what it means for anyone running multiple Expert Advisors on one account, since that’s where FIFO tends to cause the most real friction.
Forex FIFO vs Tax-Lot FIFO
Before going further, it’s worth putting both meanings side by side, since the word “FIFO” gets applied to genuinely different situations.
| Context | Meaning |
| US retail forex order handling | Older offsetting transactions in the same currency pair generally need to be closed before newer ones |
| Securities or tax-lot accounting | The oldest acquired units are treated as sold first when FIFO is the selected or default cost-basis method |
If you came here wondering why your broker won’t let you close a specific forex position out of order, you’re dealing with the first meaning. If you came here wondering how your stock or crypto sales get taxed, you’re dealing with the second, and the rest of this article, aside from this section, focuses mainly on the forex version, since that’s where automated and multi-strategy traders run into the most operational complexity.
How FIFO Works in US Retail Forex
The forex version of FIFO comes from a specific rule, not a general market convention, so it’s worth naming it precisely.
The Rule, and Who Actually Enforces It
The relevant rule is NFA Compliance Rule 2-43(b), implemented by the National Futures Association in 2009. The NFA is the self-regulatory organization for the US derivatives industry, and it’s important to be precise about the relationship here: the CFTC is the federal regulator that oversees the industry broadly, while the NFA is the self-regulatory organization that writes and enforces this specific rule for its member firms. You’ll sometimes see the rule referred to loosely as “the CFTC FIFO rule,” which isn’t quite accurate, it’s an NFA compliance rule that NFA member firms must follow.
What the Rule Actually Requires
Per the NFA’s own rule text, Forex Dealer Members may not carry offsetting positions in a customer account and must offset them on a first-in, first-out basis. At a customer’s request, a Forex Dealer Member may offset same-size transactions even where older transactions of a different size exist, though the exact mechanics of that exception depend on the specific transactions involved. In practice, this means that if you hold multiple open positions in the same currency pair and place an order that reduces that exposure, the offset is generally applied to the oldest eligible position first, rather than letting you choose which specific position to close.
Which Accounts and Firms Are Affected
Rule 2-43(b) applies specifically to NFA member firms acting as Forex Dealer Members or Retail Foreign Exchange Dealers, along with other categories of NFA members whose activities touch retail forex. It doesn’t apply to every trading account everywhere. A broker operating outside NFA jurisdiction, in a different country under a different regulator, isn’t bound by this specific rule, though it may be bound by an equivalent rule in its own jurisdiction. This is exactly why “which broker, and where” matters more than a general statement like “forex has a FIFO rule” can convey on its own.
FIFO vs Hedging vs Netting
These three concepts get treated as one thing constantly, and separating them properly is probably the single most useful thing this article can do.
| Concept | Meaning |
| FIFO | Older eligible exposure is reduced before newer exposure |
| Hedging account | Multiple long and short positions may be represented separately |
| Netting account | Positions in the same instrument are combined into one net exposure |
| No-offsetting-position rule | Opposing positions may not be maintained independently in the same account |
FIFO governs the order in which positions get closed. Hedging and netting describe how a platform or broker represents your exposure in the first place, whether as separate tickets or one combined figure. Rule 2-43(b) also functions as a no-offsetting-position rule in practice, since it effectively prevents a customer from holding independent opposing positions in the same pair at a Forex Dealer Member. These interact with each other, but they’re not the same rule wearing different names, and a platform’s account configuration, not just the underlying regulatory obligation, shapes how all of this actually plays out for you.
A Practical Position-Closing Example
Here’s a concrete way to picture it. A trader opens three EUR/USD positions on Monday, Tuesday, and Wednesday. If the account is subject to a FIFO position-closing rule, an order that reduces the shared EUR/USD exposure may be applied to the oldest eligible transaction first, meaning the Monday position typically gets closed before the Tuesday or Wednesday ones. Exact treatment can depend on position size, partial-close rules, account configuration, and broker implementation, so treat this as an illustration of the general principle rather than a guarantee of exactly how your specific account will behave. Test the actual behavior on your own account before assuming it matches this example precisely.
How FIFO Can Affect Expert Advisors
This is where FIFO stops being an abstract rule and starts being a real operational headache, particularly for anyone running more than one automated strategy on a single account.
When several EAs trade the same symbol, each EA may treat its own trade as independent while the broker treats all positions as part of one account-level sequence. An EA built without this in mind can submit a close order expecting to affect its own specific position, only to have the broker apply that action to the oldest eligible position instead, which might belong to a completely different strategy.
| EA Problem | Safer Design Approach |
| Two EAs trade the same pair | Use a shared position manager |
| Each EA expects to close its own ticket | Track virtual strategy positions internally |
| Opposing signals appear | Net signals before submitting orders |
| Different lot sizes distort risk | Keep risk-based sizing and redesign order logic instead |
| Partial closes behave unexpectedly | Test broker-specific close rules directly |
| Demo and live behavior differ | Validate on the exact intended account type |
A quick but important caution here: changing lot sizes purely to sidestep FIFO behavior, a tactic that shows up often in trader forums and educational content, can distort your actual portfolio risk and isn’t guaranteed to work consistently across brokers or account types. Some platform implementations may treat equal-sized and differently sized positions differently, but you shouldn’t assume that changing lot size avoids a regulatory or broker requirement. Confirm the broker’s written position-closing policy and test the exact behavior using the same account type you intend to trade live, not just a demo, since the two don’t always match.
Compliant Multi-EA Design Approaches
Rather than treating FIFO as an obstacle to route around, the more durable fix is designing your EA setup to work with it from the start.
- Assign one symbol to one EA where practical, removing the shared-position conflict entirely
- Where multiple strategies genuinely need to trade the same symbol, use one shared position manager that coordinates entries and exits across them
- Aggregate strategy signals before order submission, so the account only ever sees one net order per symbol rather than competing individual ones
- Use virtual sub-positions inside the EA itself, tracking each strategy’s notional exposure internally while the broker only sees the account’s actual combined position
- Maintain strategy-level accounting separately from broker-level positions, so your own records reflect what each strategy is doing even when the account shows one merged figure
- Confirm partial-close behavior directly with your broker before relying on it in live trading
- Use account structures your broker actually supports and has documented, rather than assuming a workaround will hold up under live conditions
This approach takes more upfront design work than simply running several EAs independently and hoping for the best, but it holds up far better once real money and a live account replace the more forgiving conditions a demo account might show.
MT4 and MT5 Account Configuration
Platform behavior here is more nuanced than a simple “MT4 is fine, MT5 has problems” framing suggests. MetaTrader behavior depends on the broker’s account configuration. MT5 can be offered with netting or hedging-style position accounting, while brokers can impose additional position-closing restrictions to meet local regulatory requirements. MT4’s longer history doesn’t exempt a broker from current regulatory requirements either, a broker can apply FIFO-style controls on MT4 just as it can on MT5, depending on how the account is set up and which jurisdiction the broker operates under. MT4 and MT5 users should test partial closes, opposite orders, and multi-EA behavior using the exact live-account configuration their broker actually offers, rather than assuming platform version alone determines the outcome.
Questions to Ask Your Broker
Before running multiple EAs on a single account, a short conversation with your broker, or a careful read of their written trading conditions, answers most of what actually matters.
| Question | Why It Matters |
| Is the account hedging or netting? | Determines how positions are represented |
| Which FIFO rules apply? | Establishes the permitted close sequence |
| Are partial closes supported? | Affects EA exit logic |
| How are differently sized positions handled? | Prevents reliance on unsafe assumptions |
| Can multiple accounts be opened? | Relevant to strategy separation |
| Are opposite positions allowed? | Determines hedging behavior |
| Does demo match live configuration? | Avoids false test results |
| What error codes are returned? | Helps the EA handle rejected actions safely |
Frequently Asked Questions
Does FIFO apply to stock and crypto trading the same way it applies to forex?
Not in the same sense. In US retail forex, FIFO is an NFA compliance rule governing the order in which a Forex Dealer Member must close offsetting positions in the same currency pair. In stocks, crypto, and other securities, FIFO more commonly refers to a cost-basis accounting method used to determine which purchased units are treated as sold first for tax purposes. Both share the “oldest first” logic, but one is a broker-level order-handling rule and the other is an accounting convention, and they’re governed by entirely different rules and authorities.
Can I avoid the FIFO rule by using a broker outside the United States?
Trading through a broker regulated in a different jurisdiction may mean NFA Compliance Rule 2-43(b) specifically doesn’t apply, since that rule governs NFA member firms. That doesn’t mean the account is automatically better or safer, offshore brokers operate under different regulatory protections, which vary considerably by jurisdiction and firm. Before moving an account for this reason, independently verify the broker’s actual regulatory status, client-money protections, and standing through official sources rather than assuming “not FIFO” means “better regulated.”
Why does FIFO cause more problems for automated trading than manual trading?
Manual traders typically manage a small number of positions consciously, so the closing order rarely conflicts with their intentions. Automated systems, especially multiple Expert Advisors running independently on one account, can each assume they’re managing their own isolated position when the broker actually treats all positions in that symbol as one combined, ordered sequence. An EA that submits a close order expecting to affect its own trade can inadvertently close a different strategy’s older position instead, which is why EA design matters as much as understanding the rule itself.
Does FIFO mean I can’t hedge at all in a US forex account?
Effectively, yes, for accounts held at NFA member Forex Dealer Members, since Rule 2-43(b) functions as a no-offsetting-position rule alongside its ordering requirement, which generally prevents holding independent long and short positions in the same currency pair at the same firm. This is different from portfolio-level hedging using different, non-offsetting instruments, or from hedging through an account structured differently at a broker not subject to this specific rule. Confirm your broker’s actual account type and rule set directly rather than assuming hedging is universally unavailable everywhere.
Is FIFO the same thing as a broker refusing to let me trade multiple strategies?
No, though the two often get confused. FIFO governs the order in which offsetting positions close, it doesn’t prohibit running multiple strategies on one account outright. The real friction comes from EA design: strategies that aren’t built to account for shared, ordered position handling can behave unexpectedly on a FIFO-governed account. A well-designed multi-EA setup, using the compliant approaches covered earlier in this article, can run multiple strategies on a FIFO-governed account without the conflicts poorly designed setups run into.
Current Official Sources
For the most current, authoritative detail on this topic, these are the sources worth checking directly rather than relying on secondhand summaries, including this one:
- NFA Compliance Rule 2-43, the official rule text
- Your specific broker’s written trading conditions and order-execution policy
- Official MetaQuotes documentation for current MT4 and MT5 account-type behavior
- Your broker’s own documentation on partial closes and order handling
- Your tax authority’s or broker’s current cost-basis documentation, for the tax-lot FIFO meaning specifically
Final Summary
To sum up, FIFO in trading means two related but genuinely different things depending on context. In US retail forex, it’s a specific NFA compliance rule requiring Forex Dealer Members to close offsetting positions in the order they were opened, which effectively rules out hedging at those firms and can complicate multi-EA setups that weren’t designed with it in mind. In securities and crypto accounting, it’s a cost-basis method for determining which units are treated as sold first. Neither version inherently protects or disadvantages a trader on its own. FIFO standardizes the sequence in which eligible positions are offset. Whether that benefits or disadvantages a particular strategy depends on the account structure and trading method. If you’re running automated strategies on a FIFO-governed account, design around it deliberately, confirm your broker’s exact implementation directly, and test on the same account type you intend to trade live before committing real capital to a multi-EA setup.

Petko Aleksandrov

