Can not open trade from python at metatrader5. - page 3

GHH_tug77  
Vladimir Karputov:

Step 2: Create a new file in MetaEditor

Copy the example from the help ( order_send  ) and completely replace the contents of the new file.

done it
Vladimir Karputov  
GHH_tug77 :
done it

Open the MetaTrader 5 terminal and take the script from the "Navigator" window and drag it onto the chart:

GHH_tug77  
Vladimir Karputov:

Open the MetaTrader 5 terminal and take the script from the "Navigator" window and drag it onto the chart:

done it. Python logo appeared at top right of window
Vladimir Karputov  
GHH_tug77 :
done it. Python logo appeared at top right of window

Check the Experts and Journal tabs: ... Make sure the Algo Trading button is enabled  Algo Tradindg On

GHH_tug77  
Vladimir Karputov:

Check the Experts and Journal tabs: ... Make sure the Algo Trading button is enabled 

Algo trading is enabled. At journal tab, this word has appeared ('python_1': python process thread create error [The system cannot find the file specified. (2)]). "python_1" is name of python script

Vladimir Karputov  
GHH_tug77 :
Algo trading is enabled. At journal tab, this word has appeared ('python_1': python process thread create error [The system cannot find the file specified. (2)]). "python_1" is name of python script

My opinion is that you misconfigured your Python. I have pure Python and everything works. You must understand that integration always requires knowledge. If you have no knowledge and are unable to complete the configuration, work in pure MQL5 and do not touch Python.

GHH_tug77  
Vladimir Karputov:

My opinion is that you misconfigured your Python. I have pure Python and everything works. You must understand that integration always requires knowledge. If you have no knowledge and are unable to complete the configuration, work in pure MQL5 and do not touch Python.

How to solve misconfigured pyhton?
Vladimir Karputov  
GHH_tug77 :
How to solve misconfigured pyhton?

Forum on trading, automated trading systems and testing trading strategies

MetaTrader 5 Python Integration for Beginners

Vladimir Karputov , 2021.07.18 06:13

The minimum that is required:

1. Python, MetaTrader Python package, matplotlib and pandas packages. A description of the installation is available and a test script is available in the documentation in the MetaTrader module for integration with Python section.

Step by step instructions :

1.1. Download the latest Python 3.8 from https://www.python.org/downloads/windows

Scrolling down the page, we find release 3.8.0:

Rice. 1. Select release 3.8.0

and download the usual Windows installation file:

Rice. 2. Download the file 'python-3.8.0-amd64.exe'

After installing Python, start the MetaEditor - the path to Python should be written in the settings on its own:

Rice. 3. Path to Python in MetaEditor settings  

1.2. When installing Python, check the "Add Python 3.8 to PATH%" checkbox so that you can run Python scripts from the command line.

1.3. Install MetaTrader5 module: in Windows 10 command line

pip install MetaTrader5

1.4. Add matplotlib and pandas packages

pip install matplotlib
pip install pandas

2. You also need a Jupyter Notebook (a development environment for Python that allows you to see the results of executing Python code). This assumes Python is already installed - install the package from the command line

pip install notebook
Jupyter Notebook is launched via the command line:
jupyter notebook



GHH_tug77  
Vladimir Karputov:

you know i have python 3.8.5. I can not reinstall  windows operation system. Pls how to solve in short way?
Vladimir Karputov  
GHH_tug77 :
you know i have python 3.8.5. I can not reinstall  windows operation system. Pls how to solve in short way?

Why reinstall Windows ??? please read the post above - it is written step by step how to install Python (I went through these steps myself).