Bman: I've got two servers each running the same EA's. One is a backup incase there should be an issues with the first and they both have the same EA's running. One MT5 has algo trading on and the other is off to not double up on trades. Is there a way to automate failover so the mt5 clients on the second server becomes active if the first should lose connectivity?
Since both do the same, and in case you have the source code, you can monitor if the positions actually open.
What I mean is following. One is in monitoring mode, while the other is in operations mode.
The monitoring EA takes over as it sees a position has not been opened, although it should have been opened.
To flag your EAs, such that it is clear which has opened the positions, the operations EA uses only even numbers in the last digit of the SL values on the positions, while the monitoring EA uses odd numbers in the last digit of the SL.
Now they can sense wich EA is currently the operations EA and automatically switch into monitoring mode.
This way you get a redundant system that's independent of each other, but aware of the current state.
EDIT:
The monitoring EA uses a timeout to check if the position has opened. It will be delayed in opening the position, but something around 5 seconds should be ok.
It does depend a bit on your strategy.
One drawback could be if you experience only a short outage that would make the first EA open the position at the same time the fail over system would place its position.
Another option could be a round robin system, where every other position is opened by the other EA.
Dominik Egert #:
Since both do the same, and in case you have the source code, you can monitor if the positions actually open.
What I mean is following. One is in monitoring mode, while the other is in operations mode.
The monitoring EA takes over as it sees a position has not been opened, although it should have been opened.
To flag your EAs, such that it is clear which has opened the positions, the operations EA uses only even numbers in the last digit of the SL values on the positions, while the monitoring EA uses odd numbers in the last digit of the SL.
Now they can sense wich EA is currently the operations EA and automatically switch into monitoring mode.
This way you get a redundant system that's independent of each other, but aware of the current state.
EDIT:
The monitoring EA uses a timeout to check if the position has opened. It will be delayed in opening the position, but something around 5 seconds should be ok.
It does depend a bit on your strategy.
One drawback could be if you experience only a short outage that would make the first EA open the position at the same time the fail over system would place its position.
Another option could be a round robin system, where every other position is opened by the other EA.
It's dangerous approach, it will be very easy to get bad interaction between the 2 instances, I would not recommend it (though, yes it can work).
I would rather recommand a external monitoring which will enabled the "production" mode on one EA only.
Alain Verleyen #:
It's dangerous approach, it will be very easy to get bad interaction between the 2 instances, I would not recommend it (though, yes it can work).
I would rather recommand a external monitoring which will enabled the "production" mode on one EA only.
Yes, I agree, it takes some effort to make it work reliable. And still a chance of glitch is given with such a system. The round robin concept is probably much more robust, where each EA only takes every other trade.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I've got two servers each running the same EA's. One is a backup incase there should be an issues with the first and they both have the same EA's running.
One MT5 has algo trading on and the other is off to not double up on trades.
Is there a way to automate failover so the mt5 clients on the second server becomes active if the first should lose connectivity?
Thanks