Description
I have installed mt5 last version and its currently running on my windows machine. I have used the mt5 library for python for a while but i wasn't able to download all the historical data for any symbol (it only allow me to download like 2 months ago only and i need everything available), so i reached this library since i need all the historical data from some metatrader symbols. I've installed this library but i have an error when trying to use it, maybe i skiped some step ?
Again Traceback (most recent call last)
File c:\Users\usuario\AppData\Local\Programs\Python\Python310\lib\site-packages\ejtraderMT\api\mql.py:71, in Functions._pull_reply(self)
70 try:
---> 71 msg = self.sys_socket.recv_json()
72 except zmq.ZMQError:
File ~\AppData\Roaming\Python\Python310\site-packages\zmq\sugar\socket.py:1009, in Socket.recv_json(self, flags, **kwargs)
990 """Receive a Python object as a message using json to serialize.
991
992 Keyword arguments are passed on to json.loads
(...)
1007 for any of the reasons :func:~Socket.recv
might fail
1008 """
-> 1009 msg = self.recv(flags)
1010 return self._deserialize(msg, lambda buf: jsonapi.loads(buf, **kwargs))
File zmq\backend\cython\socket.pyx:805, in zmq.backend.cython.socket.Socket.recv()
File zmq\backend\cython\socket.pyx:841, in zmq.backend.cython.socket.Socket.recv()
File zmq\backend\cython\socket.pyx:199, in zmq.backend.cython.socket._recv_copy()
File zmq\backend\cython\socket.pyx:194, in zmq.backend.cython.socket._recv_copy()
File ~\AppData\Roaming\Python\Python310\site-packages\zmq\backend\cython\checkrc.pxd:22, in zmq.backend.cython.checkrc._check_rc()
Again: Resource temporarily unavailable
During handling of the above exception, another exception occurred:
NotDone Traceback (most recent call last)
Cell In[23], line 4
1 from ejtraderMT import Metatrader
3 # Configuración manual de puertos (deben coincidir con los del EA)
----> 4 mt = Metatrader()
File c:\Users\usuario\AppData\Local\Programs\Python\Python310\lib\site-packages\ejtraderMT\api\mql.py:138, in Metatrader.init(self, host, real_volume, tz_local, dbtype, dbhost, dbport, dbpass, dbuser, dbname, debug)
136 self.__utc_timezone = timezone("UTC")
137 self.__my_timezone = get_localzone()
--> 138 self.__utc_brocker_offset = self.___utc_brocker_offset()
139 # db settings
140 self.dbtype = dbtype or "SQLITE" # SQLITE OR INFLUXDB
File c:\Users\usuario\AppData\Local\Programs\Python\Python310\lib\site-packages\ejtraderMT\api\mql.py:407, in Metatrader.___utc_brocker_offset(self)
405 utc = datetime.now(self.__utc_timezone).strftime("%Y-%m-%d %H:%M:%S")
406 try:
--> 407 broker = self.accountInfo()
408 broker = datetime.strptime(broker["time"], "%Y.%m.%d %H:%M:%S")
409 except KeyError:
File c:\Users\usuario\AppData\Local\Programs\Python\Python310\lib\site-packages\ejtraderMT\api\mql.py:279, in Metatrader.accountInfo(self)
278 def accountInfo(self):
--> 279 return self.__api.Command(action="ACCOUNT")
File c:\Users\usuario\AppData\Local\Programs\Python\Python310\lib\site-packages\ejtraderMT\api\mql.py:113, in Functions.Command(self, **kwargs)
110 self._send_request(request)
112 # return server reply
--> 113 return self._pull_reply()
File c:\Users\usuario\AppData\Local\Programs\Python\Python310\lib\site-packages\ejtraderMT\api\mql.py:73, in Functions._pull_reply(self)
71 msg = self.sys_socket.recv_json()
72 except zmq.ZMQError:
---> 73 raise zmq.NotDone("Data socket timeout ERROR")
74 return msg
NotDone: Data socket timeout ERROR