Skip to main content

A wrapper of MetaTrader5 official package that enables multiple terminal instances at the same time.

Project description

Py2MQL5

A wrapper of MetaTrader5 official package that enables multiple terminal instances at the same time.

Documentation

First copy your MetaTrader5 from its installation directory to a normal folder (don't put it in a system directory like Program Files, C:, root, etc).

Then you can use the following code to connect to the terminal:

from py2mql5 import Client

client = Client(terminal_path="path/to/your/MetaTrader5", login=123456, password="password", server="server-demo")

All original functions will be client.official.function_name(parameter) now.

For example:

# Original MetaTrader5 usage (only support one terminal):
import MetaTrader5 as Mt5
Mt5.initialize()
Mt5.terminal_info()

# Py2MQL5 usage:
from py2mql5 import Client

client = Client(terminal_path="path/to/your/MetaTrader5", login=123456, password="password", server="server-demo") # must provide login and password, and portable mode will be True
client.official.terminal_info() # Will work as Mt5.terminal_info()

# You can also create multiple clients:
client2 = Client(terminal_path="path/to/your/MetaTrader5", login=123457, password="password2", server="server-demo")
client2.official.terminal_info() 

Because this is a wrapper, you can refer to the MetaTrader5 official docs for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py2mql5-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py2mql5-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file py2mql5-0.1.0.tar.gz.

File metadata

  • Download URL: py2mql5-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.22.3 CPython/3.12.6 Windows/11

File hashes

Hashes for py2mql5-0.1.0.tar.gz
Algorithm Hash digest
SHA256 65401e59140424ba489b2dcb010f49c712d78fc1c4ea23a4d34c7316238c825b
MD5 a3380033fa82111d7f36fbcd5c8e2cdd
BLAKE2b-256 e562204ed09697e69997ea9ca508d0836ecac063e8ca4e80dcd68acf733a30e4

See more details on using hashes here.

File details

Details for the file py2mql5-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py2mql5-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.22.3 CPython/3.12.6 Windows/11

File hashes

Hashes for py2mql5-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad0233ea2f9e0eec225e74a12093142753954c18e1702a2a2c1c07a89785d3fa
MD5 3ec8fbeed05b5bf7ca600e8e7d23543b
BLAKE2b-256 9896bc1274b50353eca50ac62b60eb83fa9a5986693e21c7d5ef42ca0eaf0014

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page