stdlib-utilities
MQL4/MQL5 language and runtime utilities reference skill. Use for: magic number isolation; OrderSend retry logic; .set file parameter presets; MQL4 vs MQL5 differences; file I/O and sandbox rules; string manipulation; array operations; date/time functions; terminal global variables; SQLite database access; runtime error codes; type conversion; matrix/vector stubs. Trigger: "magic number", "OrderSend retry", ".set file", "MQL4 vs MQL5", "file I/O", "string functions", "array functions", "date and time", "global variables", "database", "type conversion", "runtime error", "MqlDateTime", "terminal global".
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install metatrader-stdlib-utilitiesManual setup by platform
Claude Code
~/.claude/skills/metatrader-stdlib-utilities/SKILL.md
Instructions
Standard Library Utilities
Language-level reference for MQL4/MQL5 standard library functions, runtime
utilities, and development conventions.
This is a Reference skill: the body is a routing table into references/.
Read the relevant reference file for the function family you need.
Purpose
Catalogs the MQL5 standard library and runtime utility surface — everything
from string manipulation and file I/O to database access, math functions,
and terminal global variables. The initial "Development Standards" section
covers EA structure conventions, input parameter grouping, error handling
patterns, .set file presets, and MQL4 vs MQL5 differences.
When to Use
- Looking up a specific function family: file I/O, strings, arrays, math,
time, conversion, database, global vars - Structuring EA input parameters and magic numbers
- Implementing OrderSend retry logic
- Creating .set file presets
- Understanding MQL4 vs MQL5 differences before porting code
- Checking runtime error code ranges or trade return codes
Do NOT use for:
- EA architecture / 5-layer module wiring → use
ea-architect - ENUM_* constant tables (chart, trade, object properties) → use
constants - Indicator buffer/plot setup → use
ea-architectreferencecustom-indicators.md
References
| File | Contents | Read when |
|---|---|---|
references/dev-standards.md | EA header template, input grouping, magic number rules, mandatory components, OrderSend retry, .set presets, MQL4 vs MQL5 | Starting a new EA; structuring inputs; setting up presets |
references/program-context.md | MQLInfoInteger/MQLInfoString, ENUM_PROGRAM_TYPE, MqlDateTime, TerminalInfo*, program lifecycle, IsStopped | Checking tester/trade/dll permissions; resolving data paths; runtime identity |
references/error-codes.md | Runtime error code ranges, TRADE_RETCODE_* return codes | Debugging OrderSend failures; mapping GetLastError() values |
references/named-constants.md | ENUM_POINTER_TYPE, REASON_* uninit codes, ENUM_DATATYPE, math constants, compile macros, EMPTY_VALUE, INVALID_HANDLE | CheckPointer() usage; OnDeinit reason handling; data type lookup |
references/file-io.md | File sandbox rules, FileOpen flags, text/binary read/write, FileFindFirst/FileFindNext/FileFindClose, FileCopy, FolderCreate | Reading/writing EA data files; file search; folder management |
references/time-date.md | TimeCurrent, TimeTradeServer, TimeLocal, TimeGMT, TimeToStruct, StructToTime, calendar field helpers | Broker-aligned time handling; timestamp conversion |
references/strings.md | StringAdd, StringConcatenate, StringFind, StringReplace, StringSplit, StringTrimLeft, StringTrimRight, StringToLower | Building or parsing strings; CSV tokenization; case normalization |
references/conversions.md | DoubleToString, StringToDouble, NormalizeDouble, StringFormat, ColorToString, TimeToString, StructToCharArray | Formatting output; parsing input; color/time serialization |
references/arrays.md | ArrayResize, ArrayCopy, ArraySetAsSeries, ArraySort, ArrayBsearch, ArrayMaximum, ArrayInsert, ArrayToFP16 | Dynamic array management; search/sort; series orientation |
references/math.md | MathSin/Cos/Tan, MathExp/Log/Pow, MathFloor/Ceil/Round, MathRand, MathIsValidNumber | Indicator math; risk calculations; floating-point safety |
references/common-utilities.md | Print/PrintFormat, Alert, Sleep, ExpertRemove, TesterStatistics, CheckPointer, GetMicrosecondCount, CryptEncode | Logging; tester utilities; memory/pointer helpers; profiling |
references/global-variables.md | GlobalVariableSet, GlobalVariableGet, GlobalVariableSetOnCondition, GlobalVariableTemp | Cross-session flags; inter-program coordination |
references/database.md | DatabaseOpen, DatabasePrepare, DatabaseBind, DatabaseRead, DatabaseExecute, transactions, import/export | SQLite storage in MQL5; prepared statements; bulk writes |
references/matrix-stub.md | matrix<T>/vector<T> function catalog — init, manipulations, products, statistics, transformations, ML | Matrix/vector numerical work; linear algebra in MQL5 |
Security
Reviews (0)
Related skills
Browse all →More from MetaTrader Skills
View source →More Build skills
Browse category →Frequently asked questions about stdlib-utilities
What does the stdlib-utilities skill do?
MQL4/MQL5 language and runtime utilities reference skill. Use for: magic number isolation; OrderSend retry logic; .set file parameter presets; MQL4 vs MQL5 differences; file I/O and sandbox rules; string manipulation; array operations; date/time functions; terminal global variables; SQLite database access; runtime error codes; type conversion; matrix/vector stubs. Trigger: "magic number", "OrderSend retry", ".set file", "MQL4 vs MQL5", "file I/O", "string functions", "array functions", "date and time", "global variables", "database", "type conversion", "runtime error", "MqlDateTime", "terminal global". It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the stdlib-utilities skill?
Run `npx @skills-hub-ai/cli install metatrader-stdlib-utilities` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/metatrader-stdlib-utilities/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does stdlib-utilities work with?
stdlib-utilities runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the stdlib-utilities skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use stdlib-utilities after installing it?
In Claude Code, type `/metatrader-stdlib-utilities` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the stdlib-utilities skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.