Can we send signs from an EA of one MetaTrader to the another EA of another MetaTrader platform? - page 2

 

Thank you n8937g and Roger!


I will check them out...

 
jaman:

I was writing basically the same points.

  1. write to a shared file. The only change is this. In order to share the file, use a symlink program to link the experts/files directory to one place, that way, you don't need external file replication. There are a bunch of symlink programs for windows which will allow you to link one directory to a different path. this way you can have metatrader\experts\files linked to metatrader2\experts\files. I used the same idea to share my entire experts folder among about five metatrader installations. That way I only ever had to update the expert in one instance, and they were all updated.
  2. this is simple to achieve with COM messaging. I was looking for the code i wrote to do this, but it's on an offline harddrive. This is a very simple method. It's used by FxSpyder to communicate between FxSpyder and MetaTrader when they send orders between FxSpyder and MetaTrader.

The COM messaging is actually quite easy, and in a way a bit better than the file system item. The one problem you'll still have is one of events. In MetaTrader, there's no way I've seen to externally trigger an event. As an example, say you want to have broker A's pricing trigger a trade on broker A and a hedge on broker B. A price update comes in on A and B (B first for some reason). On A you trigger the trade, and write to your file (or send your message). Now, if this were a news event, broker B might not get another price update until 5 seconds and 150 pips later. At that point it will see that the file has updated and will process the instructions in the file. Your hedge is now 150 pips off from where it should be.

That's not much of a concern most of the time, but it could be an issue.

Do you have a resource you can link to where I can learn how to do this "COM messaging"? I'm not familiar with this, and a google search just yields results about IM software. I think i can implement the other solution with windows mklink symlink, but i'm intrigued about the other option.

I have a master account that tests my EA on a variety of instruments, and a production account that only runs on profitable instruments at profitable settings. The problem is that the EA is incredibly resource-hungry (it's a monte carlo EA), and it would be much easier to just copy a subset of results from the search account into the production account. I have an idea on how to do this, just not sure on the communication protocol between EAs.

 
Relative:
Can we send signs from an EA of one MetaTrader to the another EA of another MetaTrader platform?
https://www.mql5.com/en/forum/127032
 
sweet! this looks exactly like what I needed. I like the abundance of comments in the source code. I'll play around with it this weekend, but it looks like it'll fit the bill nicely. Thanks again!
Reason: