mt5-trading

Build MT5 algorithmic trading systems with the Python API.

6|2|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/acaprino/claude-code-daodan --skill mt5-trading
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mt5-trading
Source: https://github.com/acaprino/claude-code-daodan/tree/main/plugins/mt5-trading/skills/mt5-trading
Command: npx skills add https://github.com/acaprino/claude-code-daodan --skill mt5-trading

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Comprehensive MetaTrader 5 Python algotrading knowledge base that guides building, testing, and deploying production MT5 algotrading solutions, covering the official API, polling event systems, robust order execution, historical data access, reconnection resilience, and Windows deployment considerations.

Core Features & Use Cases

  • Official API usage: connect to MT5 terminal via the Python API for synchronous, polling-based workflows.
  • Event-driven patterns: implement on_tick, on_new_candle, and position-tracking with reliable polling loops.
  • Trading robustness: handle fill modes, order checks, and terminal resilience across Windows deployments.
  • Data access: use copy_rates and copy_ticks for historical data and backtesting.
  • Bridge options: evaluate aiomql and ZeroMQ bridges for async or streaming needs.
  • Use Case: build a Windows MT5 bot that runs a polling loop to place orders with dynamic risk checks and automatic reconnection.

Quick Start

Install the MT5 terminal, initialize the Python API, and implement a polling-based event loop to begin trading.

Frequently Asked Questions about mt5-trading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a MetaTrader 5 trading bot with Python?

To build a MetaTrader 5 bot with Python, use the official MT5 Python API to establish terminal connectivity, implement polling-based event loops for on_tick events, and execute orders with dynamic fill modes for Windows deployments.

What is the best way to handle MT5 API event loops in Python?

The best way to handle MT5 API event loops in Python is implementing polling-based architectures. You construct continuous polling loops to track on_new_candle and position events synchronously, ensuring reliable event-driven trading workflows.

Does the MT5 Python API support historical data access for backtesting?

Yes, the MT5 Python API supports historical data access for backtesting. You use the copy_rates and copy_ticks functions within the MetaTrader 5 Python integration to retrieve historical price data for algorithmic trading strategies.

Can I use async or streaming bridges with MetaTrader 5 Python bots?

Yes, you can use async or streaming bridges with MetaTrader 5 Python bots. While the official MT5 API is synchronous, you can evaluate and implement bridge options like aiomql and ZeroMQ to handle asynchronous operations or streaming data needs.

Why does my MT5 Python trading bot disconnect on Windows?

MT5 Python trading bots disconnect on Windows due to terminal instability or connection drops. You resolve this by implementing reconnection resilience patterns within your polling loop to automatically restore the MetaTrader 5 API connection.