The are a lot of machine learning, process automation, as well as data analysis and visualization libraries for the Python language. The advanced language possibilities can now be applied in the platform through the Python integration module.
Exchange data can be easily and quickly obtained from the trading platform and then analyzed using Python tools: hundreds of thousands of financial symbol ticks can be requested with one command
Obtain account trading state and trading history to calculate statistics
Perform trading operations following your own algorithm
MetaEditor features special integrated functions for Python development: a wizard for creating blank scripts, the ability to run directly from the editor, output of messages and errors to the common log, and so on.
If Python is not installed on your computer, click Install to download the installation file.
Creating a script
Open MQL5 Wizard and select "Pyhton Script". Next, specify the script name and select library dependencies to be included in the code.
Scripts can be created using the MQL5 Wizard, while you can instantly add required library dependencies in the code.
Running the script
To run a script, press "Compile" (F7). This will open a trading platform, and the script will be launched on the current chart. Messages from the Python console (stdout, stderr) will be displayed under the Errors section.
To enable the use of the MetaTrader 5 library, install it using the following command:
For Python integration details please read the relevant documentation.