How to deal with multiple MT4 logins?

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
1211
FMIC 2016.05.03 16:09 #
 
ggekko:
Maybe you are right, but not sure. There is a common point ("communication-channel"), the account itself.

Yes, as I said the only communication possible is with the broker and that is why Doerk wanted to know if there was some less used function that would allow that out-of-channel communication between instances of the EAs.

Personally, I don't believe there is any out-of-channel solution, leaving only the Order management communications as a possibility. Hence, my two possible solutions:

  1. Detecting other orders that were not initiated by the EA in question, or
  2. Placing a "fake" pending order at an impossible price to serve as a locking semaphore.
However, neither of these are ideal and are actually quite "messy", but they may turn out to be the only viable ones.
avatar
119
Doerk 2016.05.03 16:30 #
 

The fake order does sound interesting, one could create a communication pipe using the orders comment. And due to the circumstance that actually each broker has a EURUSD symbol, this should be possible. If I decide to do it that way, I ll post it as a class library at the Code Base.

Thank you. 

avatar
1213
ggekko 2016.05.03 16:40 #
 
Doerk:

The fake order does sound interesting, one could create a communication pipe using the orders comment. And due to the circumstance that actually each broker has a EURUSD symbol, this should be possible. If I decide to do it that way, I ll post it as a class library at the Code Base.

Thank you. 

Be careful, brokers themselves too used to modify the order comments.
avatar
1211
FMIC 2016.05.03 16:45 #
 
Doerk:

The fake order does sound interesting, one could create a communication pipe using the orders comment. And due to the circumstance that actually each broker has a EURUSD symbol, this should be possible. If I decide to do it that way, I ll post it as a class library at the Code Base.

Thank you. 

Using the comment may seem ideal, but unfortunately not all brokers work with it. Some block it completely, some truncate its length, others may even add their own comments to it.

The only guarantee is to use it as a semaphore. If its already there, then the EA has already been started somewhere else and the user is asked whether to cancel and exit the EA or to ignore it and proceed (for example after a crash, where the order is left open).

You could also use the order type for an extra bit of info, but that only leaves you with 4 possibilities which is not that useful. The price itself could also be changed slightly as a variable, but not too much.

The only variables that could be "almost" freely changed to offer extra information, would be the price values for the Stop-Loss and Take-Profit.

Back to topics list   | 1 2  

To add comments, please log in or register