How can I alter my EA lot sizing to increase by 0.01 lots as it averages to remain FIFO compliant.
In my opinion your idea to change the lot size to identify the trades is almost stupid. If FIFO do not obly you to use different lot size for each trade, don't do that.
I'm not sure about FIFO rules, but from what I know FIFO is only about the sequence of closing trades so I strongely suggest to you to use SL/TP and then leave the closure handled by the broker server (who I guess it will of course respect FIFO if needed).
If you want to identify your trades from oldest to newest you can simply use the OrderOpenTime (MT4) or Position Time (MT5) and store their ticket in an array in the right sequence...
Yep, FIFO is FIFO - there’s no way around it.
Slightly altering lot sizes may technically bypass FIFO, but it’s a risky workaround and could violate broker terms.
In my opinion your idea to change the lot size to identify the trades is almost stupid. If FIFO do not obly you to use different lot size for each trade, don't do that.
I'm not sure about FIFO rules, but from what I know FIFO is only about the sequence of closing trades so I strongely suggest to you to use SL/TP and then leave the closure handled by the broker server (who I guess it will of course respect FIFO if needed).
If you want to identify your trades from oldest to newest you can simply use the OrderOpenTime (MT4) or Position Time (MT5) and store their ticket in an array in the right sequence...
The bot does not take profit on all open orders at the same time, thus I cannot just have them all take profit at the same moment and hope the broker closes them in the right order.
Not sure what you mean by stupid. I can manually open three trades at lot sizes 1, 1.01, and 1.02 and then close them in any order I wish. If i do not make all the orders different sizes, I have to close first to last. Therefore I am only interested in a local copier or trade manager that could accomplish the work around. I know the broker allows this. Pretty simple idea.
The on-point U.S. NFA regulation is Rule 2-43(b):
"(b) Offsetting Transactions
Forex Dealer Members may not carry offsetting positions in a customer account but must offset them on a first-in, first-out basis. At the customer's request, an FDM may offset same-size transactions even if there are older transactions of a different size but must offset the transaction against the oldest transaction of that size" (emphasis added).
As we analyze the rule, we see discretionary language in the word, "may." So a broker-dealer can, but is not obligated to, average (offset) where the trades are different sizes. In fact, U.S. broker-dealers openly advertise this provision in an effort to bring U.S. traders back from overseas.
We then see mandatory language in the word, "must." This means that a broker-dealer is required to average (offset) where the trades are the same size.
Rules | NFAHas a utility been made or has someone developed a tool that would allow for me to accomplish this. or is there a local trade copier that has this functionality.
This style of position management is known as pyramiding or stacking. I'm pretty sure there are no free MT5 utilities for this, because I recently coded (exclusively) one such EA for a commercial customer.
I am wanting to run my ea on a US broker under fifo rules.
the bot doesn't have to average often but when it does it can take up to 4 trades in the same direction on the same pair. all trades on the same pair and direction are all of the same size. they do no increase
when it does this, it will close the trades in the order of last to first as price moves back toward where the first trade took place.
obviously, this is in violation of FIFO rules, but the solution ( at least in theory) is very simple. if the trades are all different by 0.01 lots, they can be closed in any order I wish.
for example, if trade 1 is opened at 1 lot, trade 2 at 1.01 lot, trade 3 at 1.02 lot. I can close any of the three trades in any order.
That being said i want the trade sizes to be different but only by that smallest amount so as to not disrupt the balance of the system.
Has a utility been made or has someone developed a tool that would allow for me to accomplish this. or is there a local trade copier that has this functionality.
Any help would be greatly appreciated.
Hello,
Yes, it is possible to average trades while adhering to FIFO rules by using the minimum possible lot increment for subsequent positions. This approach allows trades to be closed in any order, as the lot sizes are slightly different.
To achieve this, you can use a parameter such as LotAdditional (Additional Lot Volume) for the next averaging position. This parameter enables the system to increase the lot size incrementally by the smallest amount allowed by your broker.
For example:
- Starting lot (Volume) of the main position = 0.1;
- LotAdditional = 0.01, then:
- The next lot sizes for opened averaging positions will be 0.11, 0.12, 0.13, and so on.
By adjusting the lot sizes slightly, this method ensures compliance with FIFO rules while maintaining the integrity of your trading strategy.
The on-point U.S. NFA regulation is Rule 2-43(b):
"(b) Offsetting Transactions
Forex Dealer Members may not carry offsetting positions in a customer account but must offset them on a first-in, first-out basis. At the customer's request, an FDM may offset same-size transactions even if there are older transactions of a different size but must offset the transaction against the oldest transaction of that size" (emphasis added).
As we analyze the rule, we see discretionary language in the word, "may." So a broker-dealer can, but is not obligated to, average (offset) where the trades are different sizes. In fact, U.S. broker-dealers openly advertise this provision in an effort to bring U.S. traders back from overseas.
We then see mandatory language in the word, "must." This means that a broker-dealer is required to average (offset) where the trades are the same size.
Rules | NFAMy man. thank you for laying that clearly. I knew this intuitively but hadn't seen law about it.
Hello,
Yes, it is possible to average trades while adhering to FIFO rules by using the minimum possible lot increment for subsequent positions. This approach allows trades to be closed in any order, as the lot sizes are slightly different.
To achieve this, you can use a parameter such as LotAdditional (Additional Lot Volume) for the next averaging position. This parameter enables the system to increase the lot size incrementally by the smallest amount allowed by your broker.
For example:
- Starting lot (Volume) of the main position = 0.1;
- LotAdditional = 0.01, then:
- The next lot sizes for opened averaging positions will be 0.11, 0.12, 0.13, and so on.
By adjusting the lot sizes slightly, this method ensures compliance with FIFO rules while maintaining the integrity of your trading strategy.
If i want to have this functionality but cannot change the source code of the EA that places the trades, would my best bet be going with a local trade copier that can take trades from a demo or live account of a non fifo broker. or another type of tool such as a trade manager that intercepts the trades before they are placed with the broker and change them accordingly? Is this a good ask of the freelance section?
My man. thank you for laying that clearly. I knew this intuitively but hadn't seen law about it.
You're most welcome. I have an ABA accredited law degree, but I no longer practice.
And of course... Disclaimer: Nothing that I post in this thread shall constitute professional legal advice.😉
If i want to have this functionality but cannot change the source code of the EA that places the trades, would my best bet be going with a local trade copier that can take trades from a demo or live account of a non fifo broker. or another type of tool such as a trade manager that intercepts the trades before they are placed with the broker and change them accordingly? Is this a good ask of the freelance section?
You can't change a deal on the fly.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am wanting to run my ea on a US broker under fifo rules.
the bot doesn't have to average often but when it does it can take up to 4 trades in the same direction on the same pair. all trades on the same pair and direction are all of the same size. they do no increase
when it does this, it will close the trades in the order of last to first as price moves back toward where the first trade took place.
obviously, this is in violation of FIFO rules, but the solution ( at least in theory) is very simple. if the trades are all different by 0.01 lots, they can be closed in any order I wish.
for example, if trade 1 is opened at 1 lot, trade 2 at 1.01 lot, trade 3 at 1.02 lot. I can close any of the three trades in any order.
That being said i want the trade sizes to be different but only by that smallest amount so as to not disrupt the balance of the system.
Has a utility been made or has someone developed a tool that would allow for me to accomplish this. or is there a local trade copier that has this functionality.
Any help would be greatly appreciated.