A common cause of -10005 is an elevation mismatch. If terminal64.exe runs as administrator and Python doesn't (or the other way round), the IPC handshake just times out even though the terminal looks fine. Run both at the same level, close all terminal instances, and let Python start the terminal itself:
import MetaTrader5 as mt5 ok = mt5.initialize(path=r"C:\Program Files\MetaTrader 5\terminal64.exe") print(ok, mt5.last_error())
If it still times out with nothing else running, then it's worth reporting with the build numbers to Service Desk.
A common cause of -10005 is an elevation mismatch. If terminal64.exe runs as administrator and Python doesn't (or the other way round), the IPC handshake just times out even though the terminal looks fine. Run both at the same level, close all terminal instances, and let Python start the terminal itself:
If it still times out with nothing else running, then it's worth reporting with the build numbers to Service Desk.
Whatever, technical issue should NOT be reported to the ServiceDesk, only financial issue. Please avoid such advice on the forum.
Hello,
I am developing a Python-based trading system using the official MetaTrader 5 Python package. I am experiencing a persistent IPC timeout when attempting to connect Python to the MT5 desktop terminal.
Environment
-
OS: Windows 64-bit
-
Python: 3.13.15 (64-bit)
-
MetaTrader5 Python package: 5.0.6231
-
MT5 terminal: Build 6231
-
Broker: Exness demo account
-
Terminal executable: C:\Program Files\MetaTrader 5\terminal64.exe
Error
mt5.initialize(path=r"C:\Program Files\MetaTrader 5\terminal64.exe") False mt5.last_error() (-10005, 'IPC timeout')
Troubleshooting already performed
-
Confirmed Python and the MT5 terminal are 64-bit.
-
Verified that the MetaTrader5 Python package imports successfully.
-
Confirmed the terminal is running and logged into my Exness demo account.
-
Checked MT5's Expert Advisors settings. “Disable algorithmic trading via external Python API” is unchecked.
-
Specified the exact terminal executable path in mt5.initialize() .
-
Increased the initialization timeout to 120,000 ms. The call still failed with (-10005, 'IPC timeout') .
-
Tested an isolated portable terminal in a separate directory. It also failed with the same error.
-
Verified that the terminal process was running and listening on its local IPC-related port.
-
Reinstalled neither MT5 nor the Python package, and have not modified the existing installation.
No orders were placed, and no live account was used for these tests.
Questions
-
Is there a known Python IPC compatibility issue with MT5 Build 6231 and Python 3.13?
-
Are there known issues with MetaTrader5 Python package version 5.0.6231?
-
Is there an official, supported method to test an earlier MT5 terminal build side by side without modifying the current installation?
-
Are there additional diagnostic steps or logs that can identify why the IPC handshake is timing out?
I would appreciate any technical guidance or confirmation of a known issue. I am happy to provide further diagnostic information if needed.
Thank you.
Before asking all these questions, you should firstly report your issue correctly.
What python code are you running ? Do you run it through MT5/ME or from a command line or otherwise ? In the latter case, is MT5 already open or is it python who launch it ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I am developing a Python-based trading system using the official MetaTrader 5 Python package. I am experiencing a persistent IPC timeout when attempting to connect Python to the MT5 desktop terminal.
Environment
OS: Windows 64-bit
Python: 3.13.15 (64-bit)
MetaTrader5 Python package: 5.0.6231
MT5 terminal: Build 6231
Broker: Exness demo account
Terminal executable: C:\Program Files\MetaTrader 5\terminal64.exe
Error
mt5.initialize(path=r"C:\Program Files\MetaTrader 5\terminal64.exe") False mt5.last_error() (-10005, 'IPC timeout')
Troubleshooting already performed
Confirmed Python and the MT5 terminal are 64-bit.
Verified that the MetaTrader5 Python package imports successfully.
Confirmed the terminal is running and logged into my Exness demo account.
Checked MT5's Expert Advisors settings. “Disable algorithmic trading via external Python API” is unchecked.
Specified the exact terminal executable path in mt5.initialize() .
Increased the initialization timeout to 120,000 ms. The call still failed with (-10005, 'IPC timeout') .
Tested an isolated portable terminal in a separate directory. It also failed with the same error.
Verified that the terminal process was running and listening on its local IPC-related port.
Reinstalled neither MT5 nor the Python package, and have not modified the existing installation.
No orders were placed, and no live account was used for these tests.
Questions
Is there a known Python IPC compatibility issue with MT5 Build 6231 and Python 3.13?
Are there known issues with MetaTrader5 Python package version 5.0.6231?
Is there an official, supported method to test an earlier MT5 terminal build side by side without modifying the current installation?
Are there additional diagnostic steps or logs that can identify why the IPC handshake is timing out?
I would appreciate any technical guidance or confirmation of a known issue. I am happy to provide further diagnostic information if needed.
Thank you.