darwinex / dwx-zeromq-connector

Wrapper library for algorithmic trading in Python 3, providing DMA/STP access to Darwinex liquidity via a ZeroMQ-enabled MetaTrader Bridge EA.
https://blog.darwinex.com/zeromq-interface-python-r-metatrader4/
BSD 3-Clause "New" or "Revised" License
341 stars 227 forks source link

unable to receive data//DWX_ZeroMQ_Connector_v2_0_1_RC8//_DWX_MTX_SUBSCRIBE_MARKETDATA_ #102

Closed 280791011 closed 3 years ago

280791011 commented 3 years ago

Hello guys, Thank you very much for maintaining this project. I'm facing a problem at early stage. bug1 bug2 It's okay to send orders into MT4. MT4 Server is able to send out data. I'm not able to receive data locally via Python.

Could you help me to figure out the problem? thanks.

elvinex commented 3 years ago

Hi, did you run the track prices function?

_zmq._DWX_MTX_SEND_TRACKPRICES_REQUEST_(['EURUSD'])

You probably did because else I think MT4 would not send prices. I just ran subscribe+trackprices and it works, so I can't reproduce the error.

280791011 commented 3 years ago

Hi, did you run the track prices function?

_zmq._DWX_MTX_SEND_TRACKPRICES_REQUEST_(['EURUSD'])

You probably did because else I think MT4 would not send prices. I just ran subscribe+trackprices and it works, so I can't reproduce the error.

Hi, elvinex, Thank you for your reply. May I know if you are using version 2.0.2 or 2.0.1? because there's no function called _DWX_MTX_SEND_TRACKPRICESREQUEST() in DWX_ZeroMQ_Connector_v2_0_1_RC8.py

thanks.

280791011 commented 3 years ago

bug3 when I print self._Market_Data_DB, it returns empty. no idea how I can make it work..

elvinex commented 3 years ago

Hi, The function name has an underscore at the end like this _DWX_MTX_SEND_TRACKPRICES_REQUEST_().

https://github.com/darwinex/dwx-zeromq-connector/blob/master/v2.0.1/python/api/DWX_ZeroMQ_Connector_v2_0_1_RC8.py

Btw. we removed version 2.0.2 (or rather included the changes into 2.0.1), so there is only one version now.

280791011 commented 3 years ago

The function name has an underscore at the end like this _DWX_MTX_SEND_TRACKPRICES_REQUEST_().

https://github.com/darwinex/dwx-zeromq-connector/blob/master/v2.0.1/python/api/DWX_ZeroMQ_Connector_v2_0_1_RC8.py

I see. this file in your link is different from what I downloaded. seems it's been updated. let me have a try. Thank you elvinex~~

280791011 commented 3 years ago

The function name has an underscore at the end like this _DWX_MTX_SEND_TRACKPRICES_REQUEST_(). https://github.com/darwinex/dwx-zeromq-connector/blob/master/v2.0.1/python/api/DWX_ZeroMQ_Connector_v2_0_1_RC8.py

I see. this file in your link is different from what I downloaded. seems it's been updated. let me have a try. Thank you elvinex~~

still doesn't work.. still empty.

elvinex commented 3 years ago

Did you delete and replace all old files? Source code and libraries?

280791011 commented 3 years ago

Did you delete and replace all old files? Source code and libraries?

I'm trying so. actually I didn't know there was an update because it's still 2.0.1.

I will update after I refresh everything.

thanks.

elvinex commented 3 years ago

Running this in ipython console worked for me:

from DWX_ZeroMQ_Connector_v2_0_1_RC8 import DWX_ZeroMQ_Connector
dwx = DWX_ZeroMQ_Connector()
dwx._DWX_MTX_SEND_TRACKPRICES_REQUEST_(['EURUSD'])
dwx._DWX_MTX_SUBSCRIBE_MARKETDATA_('EURUSD')
280791011 commented 3 years ago

Running this in ipython console worked for me:

from DWX_ZeroMQ_Connector_v2_0_1_RC8 import DWX_ZeroMQ_Connector
dwx = DWX_ZeroMQ_Connector()
dwx._DWX_MTX_SEND_TRACKPRICES_REQUEST_(['EURUSD'])
dwx._DWX_MTX_SUBSCRIBE_MARKETDATA_('EURUSD')

Yes. _DWX_MTX_SEND_TRACKPRICESREQUEST([]) is a new function in new file. And I udpated new DWX_ZeroMQ_Server_v2.0.1_RC8.mq4 as well. And now it works~~~ Thank you very much elvinex~~~

elvinex commented 3 years ago

Ok, great to hear that it worked eventually. :)