-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib does not work in MetaTrader 600, after compilation inside of new MetaEditor #2
Comments
Thank you for bringing this to my attention. I wasn't aware of this as I haven't updated my trading systems to MetaTrader build 600 yet. I will try to get this fixed as soon as time allows. Since it appears that MetaTrader made quite a few changes, I will tag the existing code base a v1.0.1 and release the updated version for build 600 as v2.0.0 |
Hi Austen, I was able to confirm that the necessary changes are inside of mql4zmq.mqh; all calls made/received to the dll (ie. mql4zmq_func) that refer to 'string' need to be 'uchar[]'. Also, s_recv needs to have a couple of things added to avoid memory leaks...I have made all these changes, but am afraid I'm a newb with the GitHub stuff so don't know how to pass these back to you for your perusal...suggestions? |
That's great! The typical way to collaborate is to:
For more on collaborating on Github: https://help.github.com/articles/using-pull-requests |
Good morning, I just realized/remembered that I am not using your mql4zmq.mq4 file (or Noticed you reopened the issue, hope these are one of the causes for any Cheers, On Thu, Feb 27, 2014 at 9:57 PM, Austen Conrad notifications@github.comwrote:
|
Thanks for the additional info Warren, When reviewing your build 600+ patch I got thinking about how many type changes I had to make within the main DLL because of the type limitations of MetaTrader pre-600. I'm now going to see how many of those type changes I can get rid of with the hope of getting as close to the original ZeroMQ spec as possible. For now I will merge in your patch as v2.0.0-pre and then ship v2.0.0 with any additional DLL changes I can make next week. If possible, are you willing to edit your pull request to go into the v2.0.0-pre branch I just created? |
Sure, no worries. I'm going to have to read the documentation...for the On Fri, Feb 28, 2014 at 2:39 PM, Austen Conrad notifications@github.comwrote:
|
Thanks for all the help! I have merged pull request #6 into the v2.0.0-pre branch. |
The pleasure's mine Austen; thank you for sharing. Happy trading! On Mon, Mar 3, 2014 at 3:35 PM, Austen Conrad notifications@github.comwrote:
|
First of all, thanks for making this available. I am new to ZMQ but already see the potential after having played around with some C# examples. I am completely new to GitHub so I have no idea if this is the correct way of addressing the issue I am having. I am currently using MT build 600+. After some minor edits of your examples, I can compile them fine. I also have no problem using PUB functionality and my C# tester app could subscribe without an issue e.g. to receive ticks. However, I can't get the SUB in MQL to work as it should. If I leave the .mqh file as is, MT4 crashes every time when running my SUB EA. If I edit the .mqh file to comment out the line LocalFree(recvPtr); in helper function "s_recv" then the SUB works i.e. receives messages but there is a memory leak instead. Since I leave MT running for long periods of time on a VPS with low RAM, it would quickly become an issue. Any ideas of how to fix/work around this? Regards, |
Hi AimHigher, taking a quick (uneducated) stab at this, I vaguely recall On Thu, Mar 27, 2014 at 1:08 PM, AimHigher notifications@github.com wrote:
|
First, thank you so much for this library, and for sharing it (very cool!). I have been using it for the past year or so, and it has stopped working in MetaTrader 600 (after compilation). Unfortunately, I'm not familiar with 'real' C/C++ coding, but found the new version of MT (can) no longer send strings (ie. ip sub/pub addresses, etc) to external DLL's, but rather char arrays; though I wouldn't know how/where to correct this. Was curious whether anyone else was experiencing this issue, and whether this might be the cause? Cheers!
Edit: to be clear, the library loads in MT (eg. can see what version of zmq is running), but the setters for pub/sub are failing (again possibly due to the changes from string to char[]?)
Found this on MQL(4) forum: "Since build 600 of MT4 was released, it's no longer easy to communicate with DLLs that use ANSI format for strings because strings in MQL4 are now in UNICODE format"
The text was updated successfully, but these errors were encountered: