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/alfio-claude-plugins 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 |
development
Quality gates for multi-reviewer code review pipelines: adversarial verification panel, completeness critic, reviewer pipeline conventions, and the context sharing pattern for parallel reviewers. TRIGGER WHEN: running /senior-review:team-review quality gates; running /senior-review:code-review Steps 4b/4c (adversarial verification and completeness check); consolidating or deduplicating findings from multiple parallel reviewers. DO NOT TRIGGER WHEN: single-reviewer style review without a consolidation phase, or generic team coordination (the upstream agent-teams skills cover that).
development
Knowledge base for pure-architecture decisions on when to unify duplicated logic into a shared abstraction versus leave it duplicated. Covers the canonical theory (Rule of Three, DRY/WET/AHA, Wrong Abstraction, Locality of Behaviour, Bounded Contexts, Tidy First options framing, CUPID vs SOLID), 12 essential-duplication patterns that justify unification, 12 wrong-abstraction patterns that justify inlining or decomposition, an operational decision frame, and a verified reading list. TRIGGER WHEN: the user is making an architectural decision about whether to centralize, extract, or remove a layer; reviewing an abstraction for premature generality; auditing scattered cross-cutting concerns; spawned by the abstraction-architect agent during /abstraction-architect:audit or as the Abstraction dimension of /senior-review:team-review or /senior-review:code-review; the user asks "should I extract this into a service" / "is this DRY enough" / "is this wrong abstraction". DO NOT TRIGGER WHEN: the task is code formatting and readability cleanup (use clean-code:clean-code), Python-specific refactoring with metrics (use python-development:python-refactor), generic dead-code removal (use senior-review:cleanup-dead-code), security review (use senior-review:security-auditor), or pure pattern-consistency review without an architecture lens (use senior-review:code-auditor).
development
Unified web frontend knowledge base covering CSS architecture, UX psychology, UI components, distinctive aesthetics, and interface design generation. TRIGGER WHEN: working on web styling, design systems, component decisions, responsive strategy, distinctive frontend aesthetics, or exploring multiple interface designs. DO NOT TRIGGER WHEN: the task is purely backend or unrelated to web frontend.
development
Stripe payments knowledge base - API patterns, checkout optimization, subscription lifecycle, pricing strategies, webhook reliability, Firebase integration, cost analysis, and revenue modeling. Loaded by stripe-integrator and revenue-optimizer agents; also consumable directly when the user asks for Stripe-specific patterns without needing an agent. TRIGGER WHEN: working with Stripe API (Payment Intents, Customers, Subscriptions, Checkout Sessions, Connect, webhooks, tax, usage-based billing), pricing strategy, or revenue modeling. DO NOT TRIGGER WHEN: payment work is non-Stripe (PayPal, Square, crypto) or the task is generic e-commerce unrelated to payments.