Trading Basics · Beginner · 10 min read
The FIFO Rule in Trading, Explained: What It Is and Who It Affects
The mechanism: first in, first out in your trades
The FIFO rule in trading, explained in one line: when you exit a trade in an instrument where you already hold more than one position, the broker closes the position you opened earliest. FIFO (first in, first out) is the convention that answers which ticket clears, whichever one you had in mind when you sent the order. Regulators and brokers apply it so traders cannot cherry-pick which trade to realise for accounting or tax reasons.
The rule becomes relevant the moment you hold more than one position in the same symbol. Imagine you are long two lots of EUR/USD opened at different prices and you send a sell order for one lot: the platform will close the lot you opened first, without asking you to confirm which one. The second lot stays open, keeps its original entry price, and continues to accrue profit or loss from there.
A position, in this context, is a specific open trade with its own entry price and timestamp. FIFO treats each trade as a stack and takes from the bottom, so your realised P&L reflects the oldest entry while the running position you are left with is anchored to the newer entries. Once you understand that mechanic, nothing about the figures that appear in your account after a close should come as a surprise, a point we expand on in our day trading complete guide.
Where you trade can shape your results as much as how you trade; see the best forex brokers and their conditions.
Why FIFO affects your trading account
FIFO changes how your broker calculates realised profit and loss, which positions clear when you reduce exposure, and how your trades are reported for tax. If you run multiple positions in the same instrument, the rule removes any flexibility to choose which one closes first, and that choice can shift your realised result for the day.
The effect is a mechanical consequence of how the ledger is kept rather than any attempt to disadvantage you. Picture a case where your first long position in gold is 50 pips offside and your second is 30 pips in profit: closing one lot under FIFO realises the loss on the first lot and leaves the winning lot open, whereas a system that let you pick could have realised the winner instead. Both outcomes end in the same unrealised equity, yet the timing of what hits your statement differs, and that timing is exactly what tax authorities look at.
FIFO also interacts with position sizing. If you scale into a trade by adding at better levels, your average entry on paper may look clean, yet the platform still unwinds position by position in order of age. A partial close acts against the oldest ticket rather than against that paper average.
The rule also shapes how brokers display your account. Platforms that enforce FIFO on a netting account (one aggregated position per instrument) merge your tickets automatically, while platforms that enforce FIFO on hedging accounts (separate tickets per trade) keep the tickets visible even though age still governs the close order. Checking which model your broker uses is a sensible first step before you plan around the rule.
FIFO versus other position-closing methods

Three methods dominate retail broker platforms:
- FIFO closes the oldest position first.
- LIFO (last in, first out) closes the newest.
- Specific identification lets you nominate the exact ticket you want to close.
Each method changes which trade clears, which cost basis is realised, and therefore the gain or loss booked at that moment.
| Method | Which position closes | Flexibility | Typical availability |
|---|---|---|---|
| FIFO (first in, first out) | Oldest open ticket | None once set | Default on US retail forex; common on UK/EU forex and CFD accounts |
| LIFO (last in, first out) | Newest open ticket | None once set | Rare in retail forex; more common in some commodities/futures contexts |
| Specific identification | Ticket you nominate | Full | Hedging-mode MT4/MT5 accounts, some CFD platforms, equities brokers |
The tax consequence of the choice is where the difference bites hardest. The netting-versus-hedging account structure interacts with this directly: a netting account shows one position per symbol and FIFO is implicit because only one ticket exists to close, whereas a hedging account keeps tickets separate, so the method the broker enforces (FIFO, LIFO or your choice) decides which ticket is realised.
For US forex accounts, the choice is made for you. The US Commodity Futures Trading Commission's rules for retail forex dealers require offsetting on a FIFO basis, which is why US-based platforms do not display LIFO or specific-identification options for spot forex. UK and EU retail forex accounts fall outside that specific US rule, yet most brokers still default to FIFO on their platforms, and some add it as a contractual term even where no regulator imposes it. Check the terms before you assume what your account does.
The content in this article is general information, not tax or legal advice. Rules change, and your personal situation may qualify for treatment that differs from the generic case: speak to a licensed tax professional in the jurisdiction where you are resident before acting on any example here.
How FIFO works in practice: a step-by-step example

Suppose you open three long positions in EUR/USD on the same account, on three consecutive days:
- Monday: ticket #1, 1 lot long at 1.0800
- Tuesday: ticket #2, 1 lot long at 1.0850
- Wednesday: ticket #3, 1 lot long at 1.0900
On Thursday, suppose EUR/USD trades at 1.0950 and you send a sell order for 2 lots. Under FIFO, the broker would close ticket #1 first (realised gain of 150 pips from 1.0800 to 1.0950) and ticket #2 second (realised gain of 100 pips from 1.0850 to 1.0950). Ticket #3, your most recent entry, would stay open with 50 pips of unrealised profit at that market price.
Had your intention been to lock in the newer, smaller gains and let the older, bigger winner run, FIFO would have prevented that by taking the oldest tickets first, as always.
The same logic applies in reverse when some tickets are losing and others are winning. Should ticket #1 be deeply offside and ticket #3 in profit, a partial close under FIFO would realise the loss on ticket #1 and leave the winner open. The equity in your account at that instant would be identical to the figure any other method produced, yet the realised line on the statement would read differently.
Hedging strategies interact with this directly. To a FIFO netting system, opening a short to offset a long in the same symbol reads as a partial close of the oldest long rather than as a hedge: the broker simply nets the exposure, and the oldest ticket closes against the new opposing order. A hedging-mode account lets the long and the short coexist as separate tickets, which keeps the hedge intact, though age still governs the order of future closes. If true independent hedging is important to you, confirm your account type before placing the second leg.
FIFO rules by broker and jurisdiction
FIFO is the default on most retail forex and CFD accounts worldwide, with the specific regulatory basis varying by region. In the United States, National Futures Association and CFTC rules for retail forex transactions require that offsetting positions be closed on a FIFO basis, which is why US platforms do not expose hedging mode or specific identification for spot forex. The UK Financial Conduct Authority and European regulators do not impose a direct FIFO mandate on the same terms, but UK and EU brokers routinely apply FIFO as a platform default or a contractual term.
Verifying what your own broker does takes three concrete steps:
- Read the account terms and conditions for the words 'FIFO', 'netting', 'hedging' or 'offsetting'. The clause is usually in the trading rules section.
- Check the platform account type at onboarding. MetaTrader 4 and MetaTrader 5 accounts are set as netting or hedging at the broker side, not switchable by the trader after the fact.
- Place a small test with two tickets on a demo account in the same symbol, close one, and see which one clears.
Implementation differs on edge cases, and the specifics vary by broker along several axes:
- Some brokers treat each lot size independently, while others merge tickets opened at the same price.
- Some apply FIFO per symbol, and a few apply it per account currency-pair bucket.
- Partial closes may be allowed to split tickets, or may require you to close the full oldest ticket before touching the next.
None of this is uniform, and the only reliable way to know is to read your broker's documentation and test the behaviour on demo.
FIFO and tax reporting for traders
FIFO determines the matching order of your trades for cost-basis purposes, which flows directly into capital-gains or trading-income calculations in most jurisdictions. If you trade frequently, the rule locks the sequence in which gains and losses are realised, and that sequence drives what appears on your tax return.
In the United Kingdom, HM Revenue and Customs applies share-matching rules that, for shares of the same class, use a specific order:
- Same-day matching first.
- The 30-day 'bed and breakfasting' window.
- The Section 104 pooled holding.
For CFD and spot forex trading, treatment depends on whether activity is taxed as capital gains or as trading income, and the matching rules differ accordingly. In the United States, the Internal Revenue Service permits specific identification for securities if elected and documented at the time of sale, but spot forex falls under different sections and the broker-enforced FIFO on the platform drives what gets reported on the year-end statement.
The practical consequence is that your tax figure follows whatever realised sequence FIFO produced, even where another sequence might have been more convenient. A trader who scales out of a long winner over several months under FIFO books the oldest, lowest-cost tickets first, which produces the largest per-lot gain in the earliest tax period. The same trades under specific identification could have been timed to spread the realised gain across tax years.
These examples are illustrative orders of magnitude rather than calculations tailored to any individual. Marginal rates, allowances, loss relief and the capital-versus-income classification all shift the final number, and a licensed tax adviser in your jurisdiction is the only reliable source for how FIFO will interact with your personal return.
Common FIFO pitfalls and how to avoid them
The recurring mistake is to assume the platform will close whichever ticket you were looking at when you clicked. Under FIFO it closes the oldest instead, which is often a ticket from a different setup, a different entry logic, or a different session. The surprise then shows up as an unexpected realised loss or gain on the statement, together with a residual position anchored to a price you had already moved on from.
A short checklist helps:
- Keep a trade log with the entry price, timestamp and ticket number for every open position.
- Before any partial close, identify which ticket is the oldest in that symbol and confirm it is the one you want to realise.
- If your platform offers hedging mode, decide whether you need it for the way you trade and set it at account opening; most brokers do not switch an existing account.
- Review your statement after each close while the trade context is still fresh, rather than waiting until the end of the month to spot a FIFO surprise.
Swing traders carrying positions across days are the most exposed, because the oldest ticket may be several entries deep by the time a close is sent. Day traders who open and close within a session rarely feel the rule because tickets are flat before new ones go on. Position sizing choices follow from this: scaling in with multiple small tickets gives finer control over partial closes under FIFO than two large tickets of equal size, because each small ticket is a smaller unit of forced realisation.
To see these conditions applied by a regulated broker, read our Tickmill review.
Frequently Asked Questions
What is the FIFO rule in trading and why do brokers use it?
FIFO (first in, first out) is a position-matching rule that closes your oldest open ticket in a given instrument first when you reduce exposure. Brokers apply it to stop traders choosing which specific trade to realise for tax or accounting purposes. In the US, the rule for retail forex is set by CFTC and NFA regulations; in the UK and EU it is usually a broker default or contractual term rather than a direct regulatory requirement.
Does FIFO apply to all trading instruments or only forex?
FIFO is most strictly enforced on retail spot forex, particularly on US-regulated accounts. It also applies on many CFD, commodities and equity broker platforms by default, but the implementation varies by broker and by instrument class. Equities brokers in some jurisdictions permit specific identification if elected in advance. Always check your account terms for the exact matching method applied to each product.
Can I request a different position-closing method instead of FIFO?
On US retail forex accounts, no: FIFO is required by regulation and no broker exposes an alternative. On UK, EU and other international accounts, some brokers offer hedging mode or specific identification, usually set at account opening rather than switchable later. For equities, specific identification may be available if you elect it at the time of sale under your jurisdiction's tax rules. Confirm with your broker and your tax adviser.
How does FIFO affect my tax liability as a trader?
FIFO fixes the order in which your trades are matched for cost-basis purposes, which determines the gain or loss realised at each close. Because it always clears the oldest ticket first, the realised sequence on your statement follows ticket age, not your preference. This can concentrate gains in earlier tax periods or trigger losses in a sequence you did not plan. The information here is general; speak to a licensed tax adviser about your own situation.
What happens if I close a position without knowing FIFO will apply?
The platform closes the oldest ticket in that symbol, which may not be the one you were looking at. You end up with a realised result based on that older entry price and a residual open position at a different cost basis. The equity change at that moment is the same as under any other method, but the realised versus unrealised split on your statement is different. Keep a trade log and verify ticket age before any partial close.
Put this into practice
Related articles

Trading Skills Development: How to Become a Better Trader
A practical guide to trading skills development: the hard skills, the soft skills, the psychological barriers, and a structured routine to build both.

TradingView Tutorial: How to Use Technical and Fundamental Analysis Together
Learn how to use TradingView for both technical and fundamental analysis in one unified workflow. Setup, tools, and tips included.

Types of Traders: Timeframe, Strategy, and Frequency Explained
A practical guide to the main types of traders, from scalpers to position traders, with the capital, technology, tax, and regulatory factors that shape each one.


0 comments