Discussing the article: "Building a FIFO-Compliant Position Management Layer for NFA-Regulated MQL5 Accounts"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Building a FIFO-Compliant Position Management Layer for NFA-Regulated MQL5 Accounts.
MQL5 exposes "AccountInfoInteger(ACCOUNT_FIFO_CLOSE)," a documented account property that reports directly whether an account requires closing positions in FIFO order—the oldest ticket on a symbol first, regardless of which ticket a strategy actually wants to reduce. A number of regulated brokers, most commonly those under NFA oversight in the United States, enforce this on hedging-mode accounts, and when they do, a close request against anything but the oldest ticket is rejected outright with "TRADE_RETCODE_FIFO_CLOSE" (10045).
Two classes divide this problem along a now-familiar line: one answers a pure ordering question with no live access at all, the other owns everything that actually touches the trade server.
Consider a simple pyramiding strategy: it adds to a position in the direction of a trend, producing several separate tickets on the same symbol opened at different times. A common exit rule for this kind of strategy is to trim the most recent add first—it has the least accumulated profit and the tightest stop, so cutting it loose first is a reasonable risk decision on its own terms.
Author: Tola Moses Hector