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

Resource timeout.. please try again. #10

Closed codingsett closed 5 years ago

codingsett commented 5 years ago

I can open and close trades but i cannot get open trades using _DWX_MTX_GET_ALL_OPEN_TRADES_ function i get the following error

Resource timeout.. please try again.

How can i fix this?

ildeb commented 5 years ago

I have the same problem, I can send a new trade but I can't see the ones already open. I don't see anything, not even an error message.

integracore2 commented 5 years ago

Hi @codingsett,

Could you describe your MetaTrader configuration?

For example, are there any other EAs / Indicators running on it?

We've found in testing that its best to dedicate one terminal specifically for use with ZeroMQ EA, but let's diagnose this further once your reply is in, no worries.

integracore2 commented 5 years ago

Hi @ildeb ,

Appears you may have have _verbosity set to False, from what you've described.

Could you confirm? If yes, please set _verbosity=True and see if that resolves the issue of no output.

codingsett commented 5 years ago

I created a threaded class that was supposed to manage trades of different currencies but i found out that the different threads cannot access the data returned by the open trades function. It can only be accessed by one thread at a time so i had to work out some solution but @integracore2 can you confirm this?

ildeb commented 5 years ago

Hi @integracore2 Yes, I confirm that the verbose mode was set to false. But now if I try to send the command _zmq._DWX_MTX_GET_ALL_OPEN_TRADES_() I get an empty dict back: {'_action': 'OPEN_TRADES', '_trades': {}} Although there are at least 10 open orders. I didn't change the port numbers, I left the default settings. I don't understand why they don't communicate with each other. Is there a troubleshooting procedure?

ildeb commented 5 years ago

Hi @integracore2 ,

I noticed that when the EA is loaded this error always appears:

DWX_ZeroMQ_Server_v2.0.1_RC8 EURUSD,M15: cannot set millisecond timer (1)

jakeeegarcia-alb commented 5 years ago

I have the same problem. Every time I try to execute the command _zmq._DWX_MTX_GET_ALL_OPENTRADES() for the first time, nothing is shown in the console. When doing it again, I get the same output

Resource timeout.. please try again.

integracore2 commented 5 years ago

Hi @jakeeegarcia-alb and @ildeb

The "Resource Timeout" error is raised when MetaTrader does not sending anything back in response to commands sent from Python.

In our tests, we found that 100% of users who submitted this report did not have the latest MS Visual C++ Runtime libraries installed, these being a mandatory dependency for both libsodium and mql-zmq (the dependency projects for dwx-zeromq-connector).

Could you please download and install the latest MS VC++ Runtime libraries, restart your machine and try launching the EA in terminal?

Thanks,

foxriver011 commented 4 years ago

hi I have the same problem I update MS VC++ Runtime libraries but the problem is not resolved _verbose is True

nguyen-t-nhan commented 3 years ago

I also updated MS VC++ Runtime libraries but the problem is not resolved. _verbose is True

muathkinsey commented 3 years ago

It looks like this topic was closed.. Im facing a similar problem when I try to send the open trade command. What could be the problem? It doesn't look like it was resolved