analyze_mql
Perform static checks on MQL4/5 source to detect structural lint issues, deprecated API usage, and complexity metrics without compiling.
Instructions
Static checks on MQL source without compiling: structural lint (missing OnInit/OnTick, unused inputs, hardcoded magic/symbol), MT4-style deprecated API calls with MT5 replacements, and size/nesting metrics.
Replaces lint_basic / check_deprecated / code_metrics. Use compile(syntax_only=true) for real compiler diagnostics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute folder to aggregate metrics over every MQL file (metrics check only). | |
| checks | No | Which checks to run; default all. | |
| source | No | Absolute path to one .mq4/.mq5/.mqh file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||