mt5.initialize fails with error code: (-10003, "IPC initialize failed, Pipe server didn't answer in 60 sec")

 

When I call MetaTrader5.initialize passing in the exe file path and the login credentials, it is opening the Metatrader terminal with the last logged in account ignoring the one passed in the initialize method, then it errors out with error code: (-10003, "IPC initialize failed, Pipe server didn't answer in 60 sec"). The account is a MT4 account.

I have also tried the other flavor of calling initialize with just the exe path argument and doing a login call separately. The initialize method called in this way also fails with the same error.

I'm hopelessly stuck and any help is much appreciated.

Documentation on MQL5: Integration / MetaTrader for Python / initialize
Documentation on MQL5: Integration / MetaTrader for Python / initialize
  • www.mql5.com
initialize - MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
The Metatrader5 Terminal version is 4.00 build 1370 11 Jan 2023 whereas the MetaTrader5 library installed on my computer for use by Python is 5.0.43. Is there any incompatibility between these two? If yes what version of the MetaTrader5 library should I be using?
 
Kannan J #: The Metatrader5 Terminal version is 4.00 build 1370 11 Jan 2023 whereas the MetaTrader5 library installed on my computer for use by Python is 5.0.43. Is there any incompatibility between these two? If yes what version of the MetaTrader5 library should I be using?

MetaTrader v4 does not support Python API. Only MetaTrader v5 has support for Python API.

The current MT5 build is 3550 (official release).


Reason: