/mql5-development:multi-assetfrom mql5-development
Multi-asset and multi-pair EA management for MQL5. Use for all logic involving trading more than one instrument: per-symbol configuration profiles (SSymbolConfig struct); 17 pre-built asset profiles across forex, metals, indices, and crypto CFDs; portfolio-level risk with correlation group limits; CMultiAssetManager class for position discovery, group counting, and total-risk enforcement; magic number assignment per symbol; multi-symbol OnTick architecture that processes each symbol independently. Trigger: "multi-pair", "portfolio EA", "multiple symbols", "all pairs", "forex and gold", "symbol manager", "asset class", "per-pair settings", "correlation management", "basket trading", "run on all symbols", "trade everything", "SymbolInfoInteger", "SymbolSelect".
Ships in mql5-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A true trading system trades multiple instruments with proper portfolio-level risk controls. One brain, many markets — with isolation per symbol and correlation limits across the portfolio.
Defines the infrastructure for running a single EA across multiple instruments:
per-symbol configuration profiles, correlation-based position limits, total
portfolio risk caps, and a multi-symbol OnTick processing loop. Also catalogs
the SymbolInfo* API surface for symbol discovery and metadata access.
Do NOT use for:
ea-architectmarket-regimerisk-enginestruct SSymbolConfig {
string symbol;
int magicNumber;
double maxSpreadPoints;
double atrMultiplierSL;
double atrMultiplierTP;
int atrPeriod;
ENUM_TIMEFRAMES entryTF;
ENUM_TIMEFRAMES htfTF;
int sessionStartUTC;
int sessionEndUTC;
double correlationGroup;
string assetClass; // "forex" | "metal" | "index" | "crypto"
};
Factory defaults for 17 instruments across forex majors, metals, US/EU indices, and crypto CFDs. Each has a unique magic number, asset-appropriate spread and ATR settings, session windows, and correlation group IDs.
Group 1.0 — USD Majors (EUR/GBP/CHF): EURUSD, GBPUSD, USDCHF -> max 2
Group 2.0 — JPY pairs: USDJPY, EURJPY, GBPJPY -> max 2
Group 3.0 — Commodity currencies: AUDUSD, NZDUSD -> max 1
Group 4.0 — CAD: USDCAD -> max 1
Group 5.0 — Metals: XAUUSD, XAGUSD -> max 1
Group 6.0 — US Indices (0.95 correlation): US500, US100, US30 -> max 1
Group 7.0 — EU Indices: GER40, UK100 -> max 1
Group 8.0 — Crypto: BTCUSD, ETHUSD -> max 1
Portfolio: all groups -> max 5% total open risk
class CMultiAssetManager {
bool GetSymbolConfig(string symbol, SSymbolConfig &cfg);
bool IsNewPositionAllowed(SSymbolConfig &cfg);
int CountPositionsInGroup(double groupId);
double GetTotalOpenRiskPct();
};
void OnTick() {
if(!IsNewBar(PERIOD_M15)) return;
for(int i=0;i<ArraySize(g_SymbolProfiles);i++)
ProcessSymbol(g_SymbolProfiles[i]);
}
void ProcessSymbol(SSymbolConfig &cfg) {
// Spread check -> risk gate -> portfolio check -> session -> signal -> lot size -> trade
double spread=(double)SymbolInfoInteger(cfg.symbol,SYMBOL_SPREAD);
if(spread>cfg.maxSpreadPoints) return;
if(!g_RiskMgr.IsTradeAllowed()) return;
if(!g_AssetMgr.IsNewPositionAllowed(cfg)) return;
if(!IsSymbolSessionActive(cfg)) return;
STradeSignal sig=g_Signal.GetSignalForSymbol(cfg.symbol,cfg);
if(sig.type==SIGNAL_NONE) return;
double atr=iATR(cfg.symbol,cfg.entryTF,cfg.atrPeriod,1);
double slDist=atr*cfg.atrMultiplierSL/SymbolInfoDouble(cfg.symbol,SYMBOL_POINT);
double lots=g_RiskMgr.CalculateLotSizeSymbol(cfg.symbol,slDist);
if(lots<=0) return;
g_TradeMgr.OpenTradeOnSymbol(cfg.symbol,sig,lots,cfg.magicNumber);
}
Symbol info enum reference (ENUM_SYMBOL_INFO_INTEGER/DOUBLE/STRING), symbol
discovery API (SymbolsTotal, SymbolName, SymbolSelect), tick/session/margin
helpers (SymbolInfoTick, SymbolInfoMarginRate, SymbolInfoSession*), and
DOM API (MarketBookAdd/Get/Release) are documented in the MQL5 Reference:
docs/mql5_com_-_docs/constants-environment_state-marketinfoconstants.mddocs/mql5_com_-_docs/marketinformation-symbolstotal.mddocs/mql5_com_-_docs/marketinformation-symbolname.mddocs/mql5_com_-_docs/marketinformation-symbolselect.mddocs/mql5_com_-_docs/marketinformation-symbolinfotick.mddocs/mql5_com_-_docs/marketinformation-marketbookadd.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
11 skills in this plugin
/constantsCanonical reference skill for MQL5 ENUM_* values, flag combinations, and property identifiers. Use for: looking up any ENUM_* name or property identifier; valid values for AccountInfo*, TerminalInfo*, Chart*, Object*, File* calls; combining bitmask flags (file modes, visibility, fill policy); trade return codes, runtime error codes, symbol property enums, Web colors, Wingdings codes, MessageBox constants. Trigger: "what does ENUM_ mean", "MQL5 error code", "property identifier", "valid values", "ENUM_SYMBOL_", "ENUM_ACCOUNT_", "ENUM_OBJECT_", "file flags", "Wingdings", "trade return code", "chart property", "OBJPROP_", "OrderGetInteger", "PositionGetDouble".
/ea-architectMaster MQL5 Expert Advisor architecture reference. Use for: wiring the 5-layer EA model (risk, regime, signal, trade mgmt, analytics); writing OnInit/OnTick/OnDeinit event handlers; setting up IsNewBar gating; designing include file layouts and .mqh module interfaces; applying naming conventions across all EA files; reading symbol properties in a broker-agnostic way; and integrating CExpert/CExpertSignal/CExpertMoney standard-library classes. Trigger: "5-layer architecture", "module wiring", "OnInit", "OnTick", "IsNewBar", "include files", "mqh", "CExpert", "event handlers", "EA template", "naming conventions", "broker-agnostic", "symbol data access".
/economic-calendarMQL5 economic calendar API reference skill. Use for: querying calendar countries or events; looking up calendar metadata by id, country, or currency code; retrieving historical or latest economic values; incremental polling with change_id for efficient live filters; wiring calendar-based trade-blocking logic into Expert Advisors. Trigger: "CalendarCountries", "CalendarEventById", "CalendarValueHistory", "CalendarValueLast", "economic calendar", "calendar filter", "news filter", "CalendarEventByCountry", "CalendarValueHistoryByEvent", "change_id".
/market-regimeMarket regime detection and filtering for MQL5 EAs. Use for all logic that determines WHETHER to trade: trend vs range classification via ADX; volatility regime via ATR (high/normal/reduced); session filtering (London/NY/Asian killzones); news event avoidance; spread spike detection; weekend and holiday blocking. This is Layer 2 — signals are never generated without passing through regime first. Trigger: "market regime", "trending vs ranging", "session filter", "news filter", "volatility filter", "spread filter", "when to trade", "ATR regime", "ADX trend strength", "killzone", "dead zone", "regime detection", "Layer 2".
/mql5-docs-lookupLooks up authoritative MQL5 answers in the official documentation through the Algo Trading Space MCP tools, instead of answering from memory. Use for: "what does this constant mean", "how does OnTesterPass work", "which handler fires on X", "cite the MQL5 docs", "is this API real", "find the docs page for SYMBOL_BID". Trigger: "mql5 docs", "official documentation", "search mql5", "resolve symbol", "does MQL5 have", "MQL5 reference".
/networkMQL5 network and outbound communication reference skill. Use for: calling WebRequest from an EA or script; opening raw TCP or TLS sockets; sending or reading bytes; checking socket readability, writability, or connection state; setting socket send/receive timeouts; using terminal-mediated SendMail, SendFTP, or SendNotification. Trigger: "WebRequest", "socket", "HTTP from EA", "REST call from MQL5", "send data to server", "SendMail", "SendFTP", "SendNotification", "TLS socket", "TCP socket", "outbound communication", "socket create", "socket connect".
npx claudepluginhub algotradingspace-dev/metatrader-skills --plugin mql5-development