Backup instance on same account

 

Hi

Can somebody tell me what happens if I start two instances of MT4 from two different computers, BOTH operating on the same account?

I want to run an EA on my PC and I want to run the same EA on the same account on another PC (as a backup in case one of the computers/connections crashes). It will work as a backup? It will work correctly?

Thanks.

PS - I don't have the second PC yet... otherwise I'd test it myself.

 
cucurucu:
Hi

Can somebody tell me what happens if I start two instances of MT4 from two different computers, BOTH operating on the same account?

I want to run an EA on my PC and I want to run the same EA on the same account on another PC (as a backup in case one of the computers/connections crashes). It will work as a backup? It will work correctly?

Thanks.

PS - I don't have the second PC yet... otherwise I'd test it myself.

I imagine that the two EAs would operate as any other two EAs on the same MT4 installation. Shouldn't be any conflicts as long as you've coded everything properly.

 

Yes. In theory it should be like that.

...but what happens if both computers send an order at the same time. Only one should be executed. Will there be conflicts or delays?

Nobody tested this?

 
cucurucu:
Yes. In theory it should be like that.

...but what happens if both computers send an order at the same time. Only one should be executed. Will there be conflicts or delays?

Nobody tested this?

I run like that every day (my brother and me are sharing the same account). There is no problem at all.

Just the journal keeps what happen on each terminal: the infos from the server are visible from both journals but the infos to the server are keeped only on the terminal which have send them.

Also, the mailbox is not shared. Mails from the server are received sometime by one terminal and sometime by the other one.

If you send the same order exactly at the same tick from both terminal, both orders will be filled (or requoted).

 
Michel:
If you send the same order exactly at the same tick from both terminal, both orders will be filled (or requoted).

Thank you Michel!

It looks like I can't use it as a back-up.

I only need ONE order to be filled, not both.

 

Does anyone know how to code something to avoid this. I'm thinking something like a primary EA and a secondary EA.

The secondary EA has to check if the primary is active (connected) and return(0) if the primary is connected. When the primary gets disconnected, the secondary should kick in.

 
cucurucu:
Does anyone know how to code something to avoid this. I'm thinking something like a primary EA and a secondary EA.

The secondary EA has to check if the primary is active (connected) and return(0) if the primary is connected. When the primary gets disconnected, the secondary should kick in.

If both are on the same network, it's easy:

The main EA write a flag (the current time for sample) on a file every 5 minutes.

The seg EA check the flag. If the main EA is frozen or not connected, there are no ticks and it cannot update the flag.

Reason: