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
344 stars 228 forks source link

[RESOLVED] subscribe data has no response #7

Closed hydrali closed 5 years ago

hydrali commented 5 years ago

Hello, Thanks a lot for writing this amazing library. I have tried to follow the tutorial, and I can successfully place and close orders through python spyder meaning python and MT4 are successfully connected. Yet when I tried to subscribe to market data there's no response. I've made sure it's not the verbose issue. I can also see clearly in the MT4 experts window the prices are publishing constantly.

_zmq._DWX_MTX_SUBSCRIBEMARKETDATA(_symbol = 'EURUSD') [KERNEL] Subscribed to EURUSD BID/ASK updates. See self._Market_Data_DB.

_zmq._Market_Data_DB.keys() Out[44]: dict_keys([])

_zmq._Market_Data_DB Out[45]: {}

image

Thanks for helping

codingsett commented 5 years ago

same here

codingsett commented 5 years ago

image

Got it working so make sure your EA is smiling and inorder to print on python while the dictionary is being updated use a while loop to print out the data or make verbose=True then you are good to go.

integracore2 commented 5 years ago

Hi @codingsett and @hydrali !

@codingsett - Thank you for providing the solution to @hydrali, great community spirit! 👏

After several issue requests pointing to the same thing, we've updated the default value _verbose=True in the class init function to avoid any confusion going forward.

This verbosity flag simply prints JSON exchange in the console when set to True.

Regardless of its status (True or False), all output is stored in self._thread_data_output at all times, so no worries either way 👍

moneyrolling commented 3 years ago

Hi, may I know do anyone still any using this library, i am having the same issues despite the _verbose is set to true and live trading allowed, anyone can offer help? thanks

VISFS98 commented 3 years ago

I have the same problem, when I subscribe to marketdata i get the next response:

image