An in-depth look at the NFA's FIFO rule, its challenges for forex traders using expert advisors, specific strategies, and practical methods to navigate its requirements.
What is FIFO
The regulations governing FX trading differ depending on the jurisdiction where the trader decides to operate. Each country around the world has its own set of rules and regulations that apply to traders and accounts under its authority.
Some may argue that one type of regulation is more favorable or less favorable to traders; however, ultimately, traders must abide by the rules and regulations where their accounts are held. In some cases, a specific type of regulation may pose a challenge to traders' strategies. In these instances, traders have to innovate or find alternatives, tools, or ideas that can help them apply their strategy.
The National Futures Association's (NFA) Rule 2-43b, also known as the "First-In, First-Out" (FIFO) rule, dictates the order in which forex trades must be closed. Specifically, it states that for any given currency pair, the oldest open trade of a particular size must be closed first. The first-in, first-out rule is a mandatory requirement that all brokers in the United States must follow; for more information and examples on how OANDA implements FIFO, please visit: https://help.oanda.com/us/en/faqs/fifo-requirement.htm.
In practical terms, an example for the first-in, first-out (FIFO) rule can be that if a trader buys 100K units of EUR/USD, and then a few minutes, or few days, or at any time that follows, the trader buys another 100K units of EUR/USD, the first position of 100K must be closed out before the second 100K. Sounds simple? Yes, however, in practical implementation within specific trading strategies, there could be some challenges. This rule can significantly impact trading strategies that involve averaging up or down, scaling in or out of positions, and hedging.
In this article, we will focus on the challenges that US-based traders face when utilizing trading strategies that involve FIFO and/or the no-hedging rules.
FIFO Implementation: Trading platforms and challenges
Although the FIFO rule is straightforward, its implementation on a trading platform can be complex depending on the technology infrastructure behind it. This can impact the execution of forex trading, whether it's manual or automated. Building a new trading strategy requires consideration of how FIFO is applied and how the broker behind the platform implements the rule on their platform.
One of the most commonly used trading platforms for algorithmic trading among retail traders is MetaTrader 4 and 5 (MT4/MT5). The platform’s coding tools, add-on capabilities, and ease of use have paved the way for its adoption by millions of traders and developers worldwide, making it one of the first go-to platforms for algorithmic trading.
Traders can build, back test, and apply their algorithmic trading strategies, known as expert advisors or EAs on MetaTrader, to their trading platforms, enabling them to trade in live markets. It is common for EA developers and traders to utilize multiple MT4 demo accounts for testing purposes before moving to live trading.
The FIFO rule challenges are typically seen in automated trading. The broker's FIFO rule implementation and the Expert Advisor (EA) design itself can significantly impact how a strategy performs.
A typical example seen over the years is an EA submitting entry orders that cannot be executed because they violate the NFA's FIFO rule, which in turn affects how the EA operates and the performance of an automated trading strategy.
It highlights the importance for currency traders, regardless of their strategy — whether it’s manual or automated — to regularly test their methods on a specific broker platform. It is also essential to speak directly to your broker and ask questions about how the FIFO rule is applied.
The world of trading strategies is vast, and traders approach the markets in diverse ways. However, any strategy, regardless of how simple or complex it is, that involves scaling in and out of a trade, averaging up or down an entry price, or hedging becomes vulnerable to the FIFO rule, and traders need to adjust their strategies accordingly.
Some trading strategies involve averaging the entry price up or down in adverse market moves, depending on the price action and the trade direction. Managing these trade closures and placing stop and limit orders may cause additional challenges that require taking FIFO into account when creating a trading strategy.
Other examples of trading strategies that may be affected by the first-in, first-out principle include those that utilize hedging as part of their market approach. Let's say that a trader has identified a trading range, a pattern, or an area of interest on a specific currency pair and has decided to buy and sell simultaneously at certain price levels where they anticipate price fluctuations; this approach may involve holding a long and a short position at the same time, which is considered a rule violation. The regulations in the United States don't allow traders to have both a long and a short position of the same instrument on the same account simultaneously.
In summary, some examples of how the NFA's FIFO Rule 2-43b can significantly impact an automated trading strategy, especially on platforms like MetaTrader 4/5, primarily because many EAs (Expert Advisors) are not inherently designed with FIFO compliance in mind. This can lead to:
- Conflict with EA logic: Many EAs are programmed to open and close trades based on specific profit targets, stop-loss levels, or indicator signals without considering the "oldest trade first" requirement. The EA won't be able to override the FIFO rule and may create an error or potentially stop working.
- Prohibition of hedging EAs: EAs designed for hedging strategies (which attempt to hold simultaneous long and short positions on the same currency pair) may not function as intended. Any attempt by the EA to open an opposing position will either be rejected by the broker or result in the forced closure of the older position, preventing the hedge.
- Complications with scaling in/out: EAs that scale into or out of positions (opening multiple trades on the same pair at different prices) will face challenges. If the EA opens various positions of the same size on the same pair, FIFO will dictate that the oldest one must be closed first, regardless of the EA's preference to close a different position. While other sizes may offer some manual flexibility, an EA's automated execution may not account for this unless it is specifically programmed to do so.
- Difficulty managing multiple trades: EAs managing a portfolio of trades or multiple positions on the same pair may struggle to optimize closures under the FIFO method. The forced closure order can lead to suboptimal profit-taking or increased losses.
- Error messages and trade rejection: Brokers are obligated to reject orders that violate the FIFO (First In, First Out) principle, resulting in "Order Rejected" messages and missed trading opportunities, which negatively impact an EA’s performance.
Methods of managing FIFO
- Utilizing sub-accounts
As the FIFO rule only applies to positions on the same account, utilizing multiple sub-accounts and adapting strategies based on various accounts may be beneficial for some methods that involve FIFO or hedging. It allows the trader to separate their strategies and positions across different accounts. - Correlated currency pairs
Most, if not all, financial instruments have some correlation with one another. Knowledge of different timeframes' correlation matrices may help traders utilize different instruments other than the initial position, which can help avoid a FIFO violation.
Read more about correlation. - Different trade size
The FIFO rule applies only to trades of equal size; thus, it provides traders with the flexibility to establish positions on the same instrument but of different sizes, thereby enabling more flexibility in trade management.
How to adapt an EA for FIFO compliance, developers may consider programming them with the following taken into account:
- Order identification: The EA needs to identify and track the opening time, ticket number, and lot size of each trade.
- Priority for closing: The EA's closing logic must prioritize the oldest relevant position first.
- Lot size management: EAs can use slightly different lot sizes for subsequent trades on the same pair (e.g., 1.0 lot, then 1.01 lot) to potentially avoid the strict "same size" FIFO rule, allowing for more independent closing, though this adds complexity.
- Partial closures: EAs need to be designed to handle partial closures in a FIFO-compliant way, typically by reducing the size of the oldest position.
- Avoiding hedging: EAs must be fundamentally re-designed to use a netting approach (fully closing a position before opening a new one in the opposite direction) instead of hedging. Traders may also consider correlated pairs.
It's crucial for traders using EAs in FIFO environments to:
- Select FIFO-compliant EAs: Look for EAs explicitly designed as NFA-compliant.
- Test on demo accounts: Thoroughly test any EA on a demo account with a FIFO-compliant broker to observe its behavior and ensure it operates as expected under real-world FIFO conditions. It is also logical to test on a live account before making significant investments.
- Understand broker implementation: Recognize that the broker's specific implementation of FIFO can also affect how an EA operates.
In conclusion, while US forex regulations, specifically the NFA's FIFO rule 2-43b and the no-hedging rule, present challenges for automated trading strategies using platforms like MetaTrader 4 and 5, these obstacles are not insurmountable. Issues such as conflicts with Expert Advisor (EA) logic, hedging prohibitions, and complications with scaling in and out can be mitigated. Traders can adapt by using sub-accounts, understanding correlated pairs, and adjusting trade sizes. EA developers should program for order identification, prioritize closing the oldest positions, manage lot sizes flexibly, and avoid hedging. Ultimately, navigating FIFO successfully requires selecting compliant EAs, thorough demo account testing, and understanding your broker's specific rule implementation, allowing traders to innovate within regulatory boundaries.
This article is for general information purposes only, not to be considered a recommendation or financial advice. Past performance is not indicative of future results. It is not investment advice or a solution to buy or sell instruments.
Opinions are the authors; not necessarily those of OANDA Corporation or any of its affiliates, subsidiaries, officers or directors.
Leveraged trading in foreign currency contracts or other off-exchange products on margin carries a high level of risk and is not suitable for everyone. We advise you to carefully consider whether trading is appropriate for you in light of your personal circumstances. You may lose more than you invest. We recommend that you seek independent financial advice and ensure you fully understand the risks involved before trading. Trading through an online platform carries additional risks. Losses can exceed deposits.