Coding

mql-compiler

Try it

Compile MQL4 (.mq4) and MQL5 (.mq5) sources to .ex4/.ex5 on Linux with the mql-compiler command, and read its compile errors.

What it does

compiles MetaTrader sources with MetaQuotes' own MetaEditor, running under Wine in the Docker image. It needs Docker and nothing else: no Windows, no MetaTrader terminal, no trading account.

The skill document

mql-compiler

mql-compiler compiles MetaTrader sources with MetaQuotes' own MetaEditor, running under Wine in the psyb0t/mql-compiler Docker image. It needs Docker and nothing else: no Windows, no MetaTrader terminal, no trading account.

Install

If mql-compiler is not on PATH, install it for the current user:

curl -fsSL https://raw.githubusercontent.com/psyb0t/docker-mql-compiler/master/install.sh | bash

It lands in ~/.local/bin; if that is not on PATH, the installer prints the line to add. For system-wide installs, upgrades, uninstalling, custom installers and troubleshooting, see references/installation.md.

Compile

Run it from the folder that holds the sources. That folder is the only one the container sees, so every path must sit inside it.

mql-compiler                       # everything under the current directory
mql-compiler MQL5/Experts/Foo.mq5  # one file
mql-compiler MQL5/Indicators       # one folder
  • Each .ex4/.ex5 is written next to its source.
  • #include <...> resolves against the nearest folder above the source named MQL4 or MQL5. Compile a terminal-style tree (MQL5/Experts, MQL5/Include, ...) from inside the MQL5 folder or one level above it, never from a copy that drops Include.
  • The first run downloads and installs MT4 and MT5 into the mql-compiler-cache Docker volume, about a minute and a half. Allow for it in timeouts; later runs take seconds.

Read the result

Results go to stdout, one line per file, followed by that file's compiler messages:

OK   MQL5/Experts/Foo.mq5 -> MQL5/Experts/Foo.ex5 (0 warnings)
FAIL MQL5/Experts/Bar.mq5 (1 errors, 0 warnings)
     MQL5/Experts/Bar.mq5(41,7) : error 256: undeclared identifier 'lots'

Errors read path(line,column) : error : , with paths relative to the current directory. Fix the source at that line and compile again. Progress and diagnostics go to stderr as JSON lines; 2>/dev/null hides them.

ExitMeaning
0Every file compiled
1At least one file has compile errors (see the FAIL lines)
2Bad path or option, or the toolchain could not be installed (see stderr)

Rules for agents

  • Use the mql-compiler command. Do not build your own docker run unless the user asks.
  • Report compile errors with their file, line and message. Do not claim a build succeeded unless the exit status was 0 and the file's line says OK.
  • MQL_COMPILER_MT4_URL and MQL_COMPILER_MT5_URL choose other installers, which only matters on a first run or after docker volume rm mql-compiler-cache. Remove the volume only when the user asks: it costs another full download.

Related skills

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván561 installs18 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván857 installs69 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

More from psyb0t

Browse all skills

Drive a user-deployed mt5-httpapi MetaTrader 5 bridge over HTTP, with per-action confirmation on every real-money call.

by psyb0t108 installs4 stars

Docker-packaged browser automation for QA against anti-bot stacks and authorized detection testing.

by psyb0t138 installs2 stars

Self-hosted OpenAI-compatible speech service — transcription, translation, and synthesis from one container.

by psyb0t13 installs

Run ffmpeg, sox, and ImageMagick jobs against your files in a fixed-allowlist SSH sandbox.

by psyb0t71 installs

Generate speech audio via Qwen3-TTS over SSH with preset voices, voice cloning, and voice design.

by psyb0t55 installs

Drive one or more IMAP/SMTP mailboxes through a single REST + MCP endpoint — read, search, send, mark-seen, and delete across accounts in parallel.

by psyb0t15 installs