Download MetaTrader 5

EA communication with different MT4 terminals and currency pairs

To add comments, please log in or register
Franzel Botha
737
Franzel Botha  

This subject has been on my mind for a while now.

 

Example



I have a EA installed on different MT terminals and different currency pairs with the same broker and same account.

 

MT4 terminal 1

EURUSD - EA magic number - 1

GBPUSD  - EA magic number - 2

 

MT4 terminal 2

USDJPY - EA magic number - 3

AUDUSD - EA magic number - 4

 

what will happen if ?? 

MT4 terminal 1

EURUSD - EA magic number - 1

GBPUSD  - EA magic number - 2

 

MT4 terminal 2

USDJPY - EA magic number - 1

AUDUSD - EA magic number - 2

 

 or

MT4 terminal 1

EURUSD - EA magic number - 1

GBPUSD  - EA magic number - 1

 

MT4 terminal 2

USDJPY - EA magic number - 1

AUDUSD - EA magic number - 1

 

or

MT4 terminal 1

EURUSD - EA magic number - 1

GBPUSD  - EA magic number - 1

 

MT4 terminal 2

USDJPY - EA magic number - 2

AUDUSD - EA magic number - 2

 

Does the EA affect  the trading of the other MT4 terminal?

Does the EA affect the trading of the other currency pairs? 

Fernando Carreiro
3951
Fernando Carreiro  
Franzel Botha: This subject has been on my mind for a while now.

Does the EA affect  the trading of the other MT4 terminal?

Does the EA affect the trading of the other currency pairs? 

Reducing it all to a simple explanation - if on the same "Account", there is more than one EA (whether on the same "MT4" or on another PC altogether), that share a magic number then they will collide if they do not verify their different symbols and timeframes.

So, if two EA's that use same magic number, but work on and verify their respective symbols time-frames, should be OK, depending on how well the EA's was coded.

If you are a good coder, you can share a magic number provided your EA's also verifies the symbol being assigned to them by the "chart" and if need be, in case you run the same EA for different time-frames, you will also need to verify the time-frame as well.

The safest way is to always, to use a different magic number for each EA period.

So, to prevent clashing, irrespective of EA being on the same MT4 terminal or being on another PC (as long as it is all on the same account), it is always necessary to use a different magic number, and preferably also verify the symbol and if need be, also the time-frame.

Franzel Botha
737
Franzel Botha  
Fernando Carreiro:

Reducing it all to a simple explanation - if on the same "Account", there is more than one EA (whether on the same "MT4" or on another PC altogether), that share a magic number then they will collide if they do not verify their different symbols and timeframes.

So, if two EA's that use same magic number, but work on and verify their respective symbols time-frames, should be OK, depending on how well the EA's was coded.

If you are a good coder, you can share a magic number provided your EA's also verifies the symbol being assigned to them by the "chart" and if need be, in case you run the same EA for different time-frames, you will also need to verify the time-frame as well.

The safest way is to always, to use a different magic number for each EA period.

So, to prevent clashing, irrespective of EA being on the same MT4 terminal or being on another PC (as long as it is all on the same account), it is always necessary to use a different magic number, and preferably also verify the symbol and if need be, also the time-frame.

I was thinking along the same way.

Unfortunately I was not the one who coded the EA, so my knowledge to the communication factor is limited.

I fully agree with your input that it is safer to give every EA its own magic number.

It just gets a bit tiring when you have to save 200 sets because every EA has a unique magic number.

(And now you wondering why 200 open lots..... I have a new Hedging strategy designed with this EA for algorithmic trading, so each EA has to be working on its own and not communicating with the others.)

Thank you for your input.
I think I will stick to rather having unique magic numbers on the EA. 

To add comments, please log in or register