Help! Can it possible to run multiple EAs with the same symbol in MT5 Netting mode independent?

 

Dear ALL

I use MT5 to trade the futures in AMP Futures, as we know futures markets was Netting mode because FIFO.

So, I find I can run multiple EAs in the same symbol independent well because it will combine all entry orders into one(it will replace the magic number also).

That's very inconvenience.

Can someone who knows, Can it possible to run multiple EAs with the same symbol in MT5 Netting mode independent?

Thank you.

 

Forum on trading, automated trading systems and testing trading strategies

...

Yang Chih Chou, 2021.07.04 08:17

Dear MetaQuotes

I use MT5 for trading futures in AMP Futures but I can't run multiple EA well, so I ask for help in this article.

https://www.mql5.com/en/forum/364768

I find there is not a good way to resolve this problem.

So, I have a little suggestion can resolve it.

The Virtual Trading position folder.

Set a Virtual Trading position folder to control the order in this folder first.

After that if people turn on the real trading it will calculate the net position into the real markets.

For example:

I use 2 EA in MT5 to trade the same symbol "Micro Nasdaq" futures.

When the entry signal is true, those 2 EA will send order to the virtual trading folder in the toolbox like this:

So, we know there are 2 position in the same symbol "mnq.hot". After that we also know the netting position was 2 lots in mnq.hot.

At this moment, if user turn on the real trading option, MT5 will send 2 lots with mnq.hot to the real futures markets. like this:

If one of EA close its own position in "Virtual Trading" below:

It will get the netting position of mnq.hot 1 lots, the real account trading will close 1 lots to match the "Virtual Trading"



 

Keep one thread thread (do not multiply the threads with same subject).

---------------- 

I do not know about any special limitation of this broker with netting and FIFO, but as far as I know - we (any trader) can use as many EAs for same symbol as we want.
The different is only with the magic number of the EA.
I mean:

  • open the chart with the symbol and attach EA to the chart;
  • open the other chart with same symbol and attach same or other EA to the chart (EA should have different magic num ber from the first EA),
  • and so on.

What is the magic number?
Metatrader is identifying the trade based on this number (for exampe, trade with number 12345 came from EA #1, and so on).
We can set those numbers in the settings/parameters of the EAs.
All the coders and most of the traders know about it.

 
Sergey Golubev:

Keep one thread thread (do not multiply the threads with same subject).

---------------- 

I do not know about any special limitation of this broker with netting and FIFO, but as far as I know - we (any trader) can use as many EAs for same symbol as we want.
The different is only with the magic number of the EA.
I mean:

  • open the chart with the symbol and attach EA to the chart;
  • open the other chart with same symbol and attach same or other EA to the chart (EA should have different magic num ber from the first EA),
  • and so on.

What is the magic number?
Metatrader is identifying the trade based on this number (for exampe, trade with number 12345 came from EA #1, and so on).
We can set those numbers in the settings/parameters of the EAs.
All the coders and most of the traders know about it.

I think maybe you don't know what I meet.
The last order entry with any EA will rewrite all EA's magicnumber cause FIFO.(combine all orders into one)
So, order's magic number will always change by the last EA, that is why I can't use multiple EA independent.
 
Yang Chih Chou:
I think maybe you don't know what I meet.
The last order entry with any EA will rewrite all EA's magicnumber cause FIFO.(combine all orders into one)
So, order's magic number will always change by the last EA, that is why I can't use multiple EA independent.
I don't know whether the FIFO rule would make sense on a netting account as there you can have only one open position per symbol (I might be wrong). So in case of buy-position a new sell position will either reduce the buy volume, close the position or results to a sell position. No FIFO no magic needed.
Reason: