| name | compile-mql5 |
| description | Use when compiling MQL5 experts, indicators, scripts, or include-dependent code in this workspace from the terminal. Follow the local MetaEditor command pattern and always inspect the compilation log after running it. |
Compile MQL5
Use this skill when compiling .mq5 files in this repository.
Command
Use MetaEditor64.exe from the local MetaTrader installation.
Example command:
& 'C:\Program Files\MetaTrader 5\MetaEditor64.exe' /compile:'C:\Users\<user>\AppData\Roaming\MetaQuotes\Terminal\<terminal-id>\MQL5\Experts\codex\FVG.mq5' /log:'C:\Users\<user>\AppData\Roaming\MetaQuotes\Terminal\<terminal-id>\MQL5\Logs\codex-fvg-compile.log'
Adjust the compiled file and log path to the target being worked on.
Log Review
Always read the log after compiling.
For the current EA example, the log is:
C:\Users\<user>\AppData\Roaming\MetaQuotes\Terminal\<terminal-id>\MQL5\Logs\codex-fvg-compile.log
Do not assume compilation succeeded just because the command returned exit code 0.
Check the log and report:
- Number of errors.
- Number of warnings.
- Important file paths mentioned by the compiler.
- Whether the expected
.ex5 file was produced or updated.