$npx -y skills add kecoma1/MQL5-SKILLS --skill compile-mql5Use 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.
| 1 | # Compile MQL5 |
| 2 | |
| 3 | Use this skill when compiling `.mq5` files in this repository. |
| 4 | |
| 5 | ## Command |
| 6 | |
| 7 | Use `MetaEditor64.exe` from the local MetaTrader installation. |
| 8 | |
| 9 | Example command: |
| 10 | |
| 11 | ```powershell |
| 12 | & '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' |
| 13 | ``` |
| 14 | |
| 15 | Adjust the compiled file and log path to the target being worked on. |
| 16 | |
| 17 | ## Log Review |
| 18 | |
| 19 | Always read the log after compiling. |
| 20 | |
| 21 | For the current EA example, the log is: |
| 22 | |
| 23 | `C:\Users\<user>\AppData\Roaming\MetaQuotes\Terminal\<terminal-id>\MQL5\Logs\codex-fvg-compile.log` |
| 24 | |
| 25 | Do not assume compilation succeeded just because the command returned exit code `0`. |
| 26 | Check the log and report: |
| 27 | |
| 28 | 1. Number of errors. |
| 29 | 2. Number of warnings. |
| 30 | 3. Important file paths mentioned by the compiler. |
| 31 | 4. Whether the expected `.ex5` file was produced or updated. |