Closed yasasp closed 5 years ago
Could you post relevant code here? I need to know what kind of ZMQ topology you are using and the format of your message.
Thanks for your time. Below is the message message format in MT4 and relevent function,
pos="flat";
if (OrderType() == OP_BUY) pos="long";
if (OrderType() == OP_SELL) pos="short";
InformPullClient(pSocket, StringFormat("%s|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f", pos,Bid, Ask, TotalOpenOrders(), MyPoint(),_Digits,OrderProfit(),OrderOpenPrice(),OrderStopLoss(),OrderTakeProfit(),iadxp,iadxn,iadxm,Max_Epsolon,Min_Epsolon,Epsolon_Dec));
// Inform Client void InformPullClient(Socket &pSocket, string message) {
ZmqMsg pushReply(StringFormat("%s", message)); pSocket.send(pushReply,true); // NON-BLOCKING }
OK, how do you get the error? under what condition? Do you encounter error the first time the code is run? Please give me details so I can help.
I tried to find the correlation of the error. But it appeared to be so random. It happen both in strategy tester and live mode. some times it comes with in 2~5 minutes and some times after ten minutes.
I think you are passing invalid values (like pointers) to zmq lib functions. But I can not pin down the exact function based on current information. Have you tried to run the EA in Debug mode and check the exact line that caused this error?
Hello, I have a much more trivial problem with libzmq.dll, it does not load! Mt4 and window 7 enterprise x64. Naturally I checked your installation instructions. Thanks
@fcbeta hi, you need to ensure that: 1. VC2015 runtime is installed; 2. 32bit DLL is used; 3. You need to enable DLL import in your EA or global configuration.
Hi @dingmaotu, unfortunately, the installation is correct: from downloaded folder \mql-zmq-master\Library\MT4\ to: MQL4\Libraries\libzmq.dll to: MQL4\Libraries\libsodium.dll from downloaded folder \mql-zmq-master\Include\ to: MQL4\ Include\Mql to: MQL4\ Include \Zmq finally the Script folder. I have also removed the old version VC2008 and installed the runtime VC2015
I tried on Windows XP sp3 with the same result, but with an old libzmq 2.0.10 library it works. There must be some other addiction I do not have?
as its weekend, cannot run the live EA with debug mode. Instead, I printing all the parameters passing on tester. See below. Most of the time error generated at in the same location in a randomly. i do not see any invalid value.
I am planning to do the debug mode when the market is open.
@fcbeta you are installing 64bit vc runtime.
@yasasp I am not saying the input parameters. The parameters passed to native zmq functions might be incorrect. I am waiting for your debug results.
@dingmaotu, I had already installed the vc2015x64 as written, but I solved by installing also the vc2015x86 runtime. Thank you for your support. Fabio
@fcbeta You are welcome.
@dingmaotu, Those values printed on the above screen-shot are the values passes to ZMQ functions. Print functions were place just before calling the ZMQ function call...
Hello Dingmaotu,
I am stating to getting more and more "Access Violation write to 0x000...." Error while testing the bridge between MT4 and Python.
i am on x64 bit window 10. Can you please advise a solution?