
In simple English
This library lets you write trading robots in Python for the MetaTrader 5 platform. It handles connection drops, order placement, and risk rules in the background. You write the strategy logic and the tool runs it across multiple currencies at once. It runs on Windows because MetaTrader requires a Windows environment to operate. It is free to use under an open source licence.
What it is
aiomql is an asynchronous Python framework wrapping the MetaTrader 5 trading platform API. It provides a base class for trading strategies, built-in risk management, session time windows, and position tracking.
What it is good for
Solo developers and traders who want to automate forex or crypto strategies in Python without writing repetitive boilerplate code for order execution and error handling.
- Wraps MetaTrader 5 functions with async-friendly interfaces and automatic reconnection.
- Includes risk management, session time restrictions, and SQLite trade logging.
- Supports running multiple strategies on different instruments concurrently.
- Requires a running Windows environment because MetaTrader 5 desktop is Windows-only.
- Requires a funded broker account supporting MetaTrader 5 to test live strategies.
- Requires solid Python knowledge to write and debug custom trading strategies.
Writing manual MetaTrader 5 integration scripts from scratch
pandas
- ranaroussi/yfinance26k stars
Downloads market history data for analysis without connecting to a broker terminal.
- jesse-ai/jesse8.7k stars
A Python framework for writing crypto trading strategies, testing them against past prices, and running them live.
- hummingbot/hummingbot20k stars
A free framework for writing and running automated trading programs on cryptocurrency exchanges.
- lballabio/QuantLib7.7k stars
The long-established free library for pricing and risk-managing financial instruments.
pip install aiomql