plugins/mt5-trading/skills/mt5-trading/SKILL.md
Comprehensive MetaTrader 5 Python algotrading knowledge base covering the official synchronous API, polling-based event systems, order execution with fill modes, historical data functions, reconnection resilience, and Windows production deployment. Includes aiomql and ZeroMQ bridge alternatives. TRIGGER WHEN: building, implementing, writing, coding, creating, optimizing, or debugging MT5 trading systems with Python. DO NOT TRIGGER WHEN: the task is outside the specific scope of this component.
npx skillsauth add acaprino/anvil-toolset mt5-tradingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Knowledge base for building production-grade algorithmic trading systems with MetaTrader 5 Python API.
For 80% of use cases, start with:
pip install MetaTrader5 (official) or pip install aiomql (async wrapper)mt5.initialize(path=..., login=..., server=..., password=...)order_check() before order_send(), always detect fill mode dynamicallyThen harden incrementally:
api-architecture.md -- MT5 Python API architecture, 32 functions, named pipes IPC, MQL5 EA vs Python, library comparisonevent-system-polling.md -- polling patterns, new candle detection, tick monitoring, position tracking, concurrency rulesorder-execution.md -- order_send, fill modes (FOK/IOC/Return), hedging vs netting, retcodes, risk checks, magic numbersdata-feed-historical.md -- copy_rates, copy_ticks, depth, timezone caveats, caching, data quality, broker differencesproduction-resilience.md -- disconnection handling, reconnection, weekend management, Windows deployment, community resources| Decision | Default | Upgrade When | |----------|---------|-------------| | Library | Official MetaTrader5 | Need async: aiomql. Need true streaming: ZeroMQ bridge | | Event model | Polling (1-5s interval) | Tick-sensitive: poll 100-250ms. True events: ZeroMQ EA bridge | | Fill mode | Detect dynamically per symbol | Never hardcode -- changes between brokers/symbols | | Account mode | Hedging (most forex brokers) | Check account_info().margin_mode at startup | | Data caching | Parquet + Zstandard | Tick data -- partition by day/month | | Concurrency | asyncio (single thread) | Multi-account -- separate processes per terminal | | Backtesting | Python framework (Backtrader, Backtesting.py) | Need MT5 tester -- MQL5 EA wrapper | | SL/TP | Server-side always | Python trailing only as supplement, never as sole protection |
tools
Master memory forensics techniques including memory acquisition, process analysis, and artifact extraction using Volatility and related tools. Use when analyzing memory dumps, investigating incidents, or performing malware analysis from RAM captures.
development
Master binary analysis patterns including disassembly, decompilation, control flow analysis, and code pattern recognition. Use when analyzing executables, understanding compiled code, or performing static analysis on binaries.
development
Idiomatic Kotlin implementation patterns: coroutines and structured concurrency, Flow / StateFlow / SharedFlow, Kotlin Multiplatform (KMP) shared-code architecture, Jetpack Compose UI, Ktor server with JWT auth and Exposed, and type-safe DSL design (lambdas with receivers, delegated properties, inline reified, value classes). TRIGGER WHEN: building, writing, or reviewing Kotlin code using coroutines / Flow / suspend functions, expect/actual, Compose composables / ViewModels, Ktor routing, sealed-class state modeling, scope functions, or DSL builders. DO NOT TRIGGER WHEN: libGDX game work (use libgdx-development), Android Java without Kotlin, or pure JVM tuning unrelated to Kotlin language features.
tools
Strategic website planning skill that conducts structured client discovery, produces professional deliverables (website brief, sitemap, design direction, content strategy), and orchestrates frontend-design, frontend-layout, seo-specialist, and content-marketer agents automatically. TRIGGER WHEN: planning a new website or redesign before any code is written. DO NOT TRIGGER WHEN: the task is outside the specific scope of this component.