dingmaotu / mql-zmq

ZMQ binding for the MQL language (both 32bit MT4 and 64bit MT5)
Apache License 2.0
556 stars 304 forks source link

Can't Load libzmq.dll in Backtester #19

Closed daniiiboy closed 5 years ago

daniiiboy commented 6 years ago

Hello Dingmaotu,

I am very new zmq, so please excuse me for this naive question.

I was able to properly install mql-zmq library following your instructions. I've put MT5 .DLLs into the Libraries folder and have enabled DLL imports on the MT5 terminal.

To begin I've written an EA that just pushes the current price every 2 seconds to the socket and a python program that listens to the socket. I was able to successfully run it on the MT5 terminal.

The issue I have encountered is when I load this simple EA into the Strategy Tester. It seems that that the tester is not able to load the libzmq.dll. See the error log bellow.

DI  0   14:50:30.578    Core 1  EURUSD,H1: testing of Experts\Advisors\Python_Server2.ex5 from 2018.05.24 00:00 to 2018.05.25 00:00 started
QH  1   14:50:30.578    Core 1  2018.05.24 00:00:00   Cannot load 'C:\Users\daniy\AppData\Roaming\MetaQuotes\Tester\..\MQL5\Libraries\libzmq.dll' [126]
DQ  2   14:50:30.578    Core 1  2018.05.24 00:00:00   Cannot call 'zmq_ctx_new', 'libzmq.dll' is not loaded
ES  2   14:50:30.578    Core 1  2018.05.24 00:00:00   unresolved import function call
GG  2   14:50:30.578    Core 1  global initialization failed
IS  2   14:50:30.578    Core 1  global initialization critical error
FD  2   14:50:30.578    Core 1  tester stopped because expert initialization failed

Do you know what the issue might be?

Thank you for any help :)

FarzanehCS commented 6 years ago

I also have a problem. When I compile my EA, it gives me a lot of undefined identifier. I am not sure why ?

SeanStayn commented 6 years ago

Are you sure, that you have installed the C++ Runtime?

https://support.microsoft.com/de-de/help/2977003/the-latest-supported-visual-c-downloads

dingmaotu commented 6 years ago

@daniiiboy @FarzanehCS

Hi, this is a common issue, please refer to #17 #6 etc. for suggestions.

FarzanehCS commented 6 years ago

hi I am actually on mac. How can I download C++ runtime on it ?

couperbrian commented 6 years ago

Hi, I had the issue of not finding the "libzmq.dll" while using the Strategy Tester. I solved it by manually copying the libzmq.dll and (libsodium.dll not sure this is needed) into the tester agent directory. I've had this problem with other unrelated DLL's in the past.

User/AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\MQL5\Libraries

The Strategy Tester uses it own version of DLL's.

daniiiboy commented 5 years ago

Hi, I had the issue of not finding the "libzmq.dll" while using the Strategy Tester. I solved it by manually copying the libzmq.dll and (libsodium.dll not sure this is needed) into the tester agent directory. I've had this problem with other unrelated DLL's in the past.

User/AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\MQL5\Libraries

The Strategy Tester uses it own version of DLL's.

This solution worked for me! Thank you for help

dingmaotu commented 5 years ago

It seems that this issue is solved.

CientificoJose commented 1 year ago

Muchas Gracias por tu Sugenrencia amigo vale mucho me ayudo a solventar el error que tenia en mi MT4 a pesar que tenia instalado C++ 2015