Closed daralucky closed 4 years ago
same here, strangely this was working on a previous version of MT4
Changing this:
InterpretZmqMessage(&pushSocket, components);
to: InterpretZmqMessage(pushSocket, components);
will fix it, not sure what the implications are
maybe @integracore2 can share some light here
I tried that even before posting this thread.
The implication is that you won't receive any message from MT4.
For example, you won't receive any opening trades information or you won't receive a response after you open a new trade.
Try to request a market symbol price and see if you get a response
Same here, after the last version build from 10 September the code is no longer working. I guess I will have to find a broker that accepts direct API communication. As working with the terminal of MetaTrader is hacky anyway
Hi @daralucky @tfmf @simooo93,
With the latest MT4 Build 1212 (10 Sep 2019), there appears to have been an update to passing variables as references to functions.
I was unable to locate this in the Release Notes though.. (link to release notes)
I can confirm that removing the &
from the call to InterpretZmqMessage
indeed fixes the issue as regards compilation.
I have just tested connectivity between Python and MT4 (build 1212, 10 Sep 2019) with the recompiled EA and cannot reproduce the no-response behaviour as reported by @daralucky
Could others please confirm if they are also experiencing no response from MetaTrader when using a recompiled version of the EA with the reference fix as discussed above?
Output in IPython console after recompiling EA as above:
_zmq = DWX_ZeroMQ_Connector()
[INIT] Ready to send commands to METATRADER (PUSH): 32768
[INIT] Listening for responses from METATRADER (PULL): 32769
[INIT] Listening for market data from METATRADER (SUB): 32770
_zmq._DWX_MTX_GET_ALL_OPEN_TRADES_()
{'_action': 'OPEN_TRADES', '_trades': {}}
I confirm that Metaeditor version 5.00 build 2138 06 Sept 2019 fails to build DWX_ZeroMQ_Server_v2.0.1RC8.mq4 with the following error message '&' - parameter passed as reference, variable expected_
Even if removing the '&' solve the compilation issue, it doesn't produce a working EA.
I had to revert back to Metaeditor version 5.00 build 1966 20 Sept 2018 to compile it successfully and get the EA to send message to external python script.
I confirm that Metaeditor version 5.00 build 2138 06 Sept 2019 fails to build DWX_ZeroMQ_Server_v2.0.1RC8.mq4 with the following error message '&' - parameter passed as reference, variable expected_
Hi @patlachance ,
DWX_ZeroMQ_Server_v2.0.1_RC8.mq4 is an MQ4 file, and hence cannot be deployed in MetaTrader 5.
MQ4 and MQ5 are not interchangeable, meaning it is not possible to deploy an MQL4 program directly in MQL5 without modifications to make it MQL5-compliant.
We are currently testing an MQL5 version that will be made available as soon as we've completed our tests.
Hello,
I have a problem loading the EA into MT4.
When I check the EA code in MetaEditor I found one error on line 199 as follows:
'&' - parameter passed as reference, variable expected DWX_ZeroMQ_Server_v2.0.1_RC8.mq4
Please have a look into this.
Thanks