Closed projectcarthage closed 3 years ago
Hi, i am having similar problems too, not sure what is going on, looks like the author not actively support this development?
I got it working by adding the requests I needed to the mt4 side of the code. In the youtube video tutorials I think it was not stated but in the github it was.
On Mon, Mar 15, 2021, 21:53 moneyrolling @.***> wrote:
Hi, i am having similar problems too, not sure what is going on, looks like the author not actively support this development?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darwinex/dwx-zeromq-connector/issues/122#issuecomment-799437393, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCD22KBAVFTCPIQHWTQ2NTTDYGNFANCNFSM4YQ2KE5Q .
hi thanks for the reply, will you mind send me the example mt4 codes you added, thanks
Hi,
I know it can be a bit confusing. But _DWX_MTX_SUBSCRIBE_MARKETDATA_()
only tells zeromq that we want to subscribe to incoming data from the socket connection. However, we still have to tell MT4 to send the data.
Therefore, you need to call both functions. The second one takes a list of symbols and tells MT4 to publish data for these symbols. For example, if you want to subscribe to tick data from EURUSD and GBPUSD, use the following:
_zmq._DWX_MTX_SUBSCRIBE_MARKETDATA_('EURUSD')
_zmq._DWX_MTX_SUBSCRIBE_MARKETDATA_('GBPUSD')
_zmq._DWX_MTX_SEND_TRACKPRICES_REQUEST_(['EURUSD', 'GBPUSD'])
Then the _zmq._Market_Data_DB
variable should contain the tick data for EURUSD and GPBUSD.
Followed steps exactly as thread above and now I am getting another error. Is my internet slow or something?
The socket connection is local, so it should not depend on the internet (except the MT4 connection to the broker). In my experience a timeout can happen if you for example restart the MT4 EA multiple times and there is a problem in resetting the socket connection.
I would try restart everything (MT4 and maybe also the PC). Then first start the MT4 EA and afterwards try again from python.
The socket connection is local, so it should not depend on the internet (except the MT4 connection to the broker). In my experience a timeout can happen if you for example restart the MT4 EA multiple times and there is a problem in resetting the socket connection.
I would try restart everything (MT4 and maybe also the PC). Then first start the MT4 EA and afterwards try again from python.
Thanks, that worked in resolving the time out error. Now I ma back to the first one where I get an empty dictionary for market data.
So the MT4 EA is active with default settings and you executed both and afterwards have an empty dict?
_zmq._DWX_MTX_SUBSCRIBE_MARKETDATA_('EURUSD')
_zmq._DWX_MTX_SEND_TRACKPRICES_REQUEST_(['EURUSD'])
What is the response message from MT4? Also, what is the MT4 log showing?
So the MT4 EA is active with default settings and you executed both and afterwards have an empty dict?
_zmq._DWX_MTX_SUBSCRIBE_MARKETDATA_('EURUSD')
_zmq._DWX_MTX_SEND_TRACKPRICES_REQUEST_(['EURUSD'])
What is the response message from MT4? Also, what is the MT4 log showing?
The second function takes a list of symbols, so that you can set all symbols you want at the same time (or remove some by omitting them). It must be (['EURUSD'])
not ('EURUSD')
.
The second function takes a list of symbols, so that you can set all symbols you want at the same time (or remove some by omitting them). It must be
(['EURUSD'])
not('EURUSD')
.
Thank you @elvinex . Tbh I was about to give up.
Great to hear that it is working. :)
I have sent buy and sell commands both had worked flawlessly. The issue is with the _zmq._DWX_MTX_SUBSCRIBEMARKETDATA() command. All requests return empty dictionaries. Am I missing something?![Missing Data](https://user-images.githubusercontent.com/79969641/109780946-7060a600-7c42-11eb-949d-5295f4444522.png)