How to use Local Trade Copier in Netting mode on MT4 accounts with FIFO limitations

MT4 Local Trade Copier Netting of Forex positions

U.S. Forex brokers and possibly some other brokers will have FIFO limitations applied to each account. It means trader or any EA is restricted to close positions only in particular order and hedge trading will be disabled too (you cannot hold BUY and SELL positions open at the same time). These restrictions cannot be changed, and anyone who is trading in such account (including EA) will have to obey these restrictions.

Local Trade Copier is capable of handling trade copying of positions on MT4 accounts with FIFO limitations including partial closes.

The “netter” feature has been introduced into the Local Trade Copier version 2.9.6, and it is applied to the trades of the same instrument.

Client EA will try to detect FIFO automatically and function accordingly, but if you know your account has FIFO restriction then it is best to force the Client EA operate in netter mode by choosing “FIFO restrictions + Netting” for the “FIFO Restrictions” parameter in the Client EA Inputs tab.

LTC Client EA operating with FIFO restrictions and Netting

LTC Client EA operating with FIFO restrictions and Netting

By default this parameter is disabled, and it should stay like that if you use EA on broker without FIFO restrictions.

Client EA has 3 operating modes regarding the FIFO, and the FIFO_Restrictions parameter allows to select 1 out of 4 choices:

  • Detect automatically.
    When “Detect automatically” is selected the Client EA will try to detect if there are FIFO restrictions or not. EA might detect that on start-up or sometime later when trade copying is in progress (SL/TP levels are constantly changed by 3rd party or trades of opposite direction are denied by the broker). But because it is not always possible to automatically detect FIFO restrictions on start-up, the EA will monitor for broker server errors 149 or 150 during trading operations. In case of such error, EA will enable “FIFO restrictions (simple)” mode automatically regardless of which option you have set for the FIFO_Restrictions parameter.
  • No FIFO restrictions.
    When this parameter is set to “No FIFO restrictions”, EA will not monitor for SL/TP changes. This option is usually used when you are using Client EA on an account that does not have FIFO restrictions, but EA detects the FIFO by mistake. It might happen if you have some 3rd party EA or account manager continually changing SL/TP on the client account. For the Client EA, such action looks like SL/TP being changed because of FIFO restrictions.
  • FIFO restrictions (simple).
    When “FIFO restrictions (simple)” is selected the Client EA will not open trades in opposite directions. For example, if there are BUY trades already running on the client account, the EA will not copy SELL trades but delay them. Once the BUY trades are closed, and the delayed SELL trades are still open on the master, the Client EA will copy them. Of course, in this case, the SELL trades would not be copied anyway because of the FIFO restrictions, but all attempts to copy SELL trades would end up in errors from the broker server. It means your account might be suspended. The “FIFO restrictions (simple)” operational mode saves the day and does not throw errors.
    Also, selecting this option will also stop the annoying behavior when Client EA keeps adjusting SL/TP values non-stop. It happens when you have more than one position for the same currency pair with FIFO restricted. When SL/TP is set on one trade, the other trades of the same pair get the same SL/TP values too, and that is applied by the broker automatically to comply with FIFO. The problem starts when Client EA detects that the SL/TP does NOT match with the master account and change them immediately. It creates an infinite loop and EA keeps changing SL/TP values over and over again while broker changes them too. But with “FIFO restrictions (simple)” this problem is solved.
  • FIFO restrictions + Netting.
    When “FIFO restrictions + Netting” is selected the Client EA will operate to obey FIFO restrictions and at the same time will do Netting when opening new trades.
    In general, netting means to allow a positive and a negative value to set-off and partially or entirely cancel each other out. For example, assume you have BUY position of 1.5 lots, and Client EA receives a SELL signal of 1.0 lots. The Client EA will “net” those positions, and the result will be a BUY position left of 0.5 lots.
    Another example would be if you have a SELL position of 0.5 lots and Client EA receives a BUY signal of 0.9 lots. It would result in a SELL (0.5) position closed, and a BUY position of the remaining 0.4 lots opened.
    Also, when FIFO+Netting is enabled, the Client EA will process “exit trade” signals differently than in normal operational mode. For example, assume you have two BUY trades of 0.5 and 0.8 lots on the master and the client account. The 0.8 BUY trade gets closed on the master account but the Client EA cannot close it because of FIFO restrictions – the 0.5 trade must be closed first. So first, the Client EA will close the 0.5 trade, and then it will close the remaining 0.3 lots from the 0.8 trade leaving 0.5 lots still running.
    Another example will be if there are 1.5 and 0.6 lots running on the master and the client account. Then, 1.5 lots are closed manually on the client account leaving only 0.6 lots. When the 1.5 lots are closed on the master account, the Client EA will clear just the remaining 0.6 lots regardless the fact that there’s a remainder of 0.9 lots (1.5-0.6). During the copying of “trade exit” signals the Client EA will not open the remaining lots as positions of opposite direction.

There are quite a few limitations because Client EA has to follow strict FIFO policy. It means that several trade copier parameters cannot be used on such accounts.

Read about MT4 trade copier FIFO limitations here.

I will repeat myself, that FIFO and Netter functions are applied only to the trades of the same instrument.

How Client EA handles hedge trades on FIFO restricted accounts without Netting

When a Client EA (without Netting function) running on FIFO restricted account receives a hedge trade, it will delay it until there’s no opposite position running or until it is closed on the master.

Imagine a situation when a FIFO client account receives a SELL trade when there’s already a BUY trade open on the same instrument.

If ‘Netting’ is disabled in the Client EA, it will delay the SELL trade by adding it to queue. It is because FIFO accounts cannot have BUY and SELL trades opened at the same time.

Scenario #1

If the SELL trade gets closed on the master, then Client EA will no longer hold it in the queue. It makes the client account to miss the SELL trade.

Scenario #2

If BUY trade on the client account is closed, the Client EA will open the SELL trade (assuming if it’s still open on the master) but only if the current market price is within max allowed deviation zone (MaxPriceDeviationPips).

More useful information

Click here for a more advanced explanation about the Netting in Forex.

Click here for a great explanation about FIFO rules.

Another great explanation about FIFO in the Forex market.

Rimantas Petrauskas

About Rimantas Petrauskas

I am the creator of the Local Trade Copier program and a professional developer of Forex trading signal delivery software for MetaTrader 4 client terminal. Also I am into 100% automated currency trading that generates profits while I enjoy the time with my family, our life and traveling.

Leave a Reply

WordPress Security