Reads MetaTrader 5 log files to access Print() output from indicators, scripts, and expert advisors. Useful for validating execution, checking compilation errors, and analyzing debug output without manual Experts pane inspection.
Ships in mql5. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read MetaTrader 5 log files directly to access Print() output from indicators, scripts, and expert advisors without requiring manual Experts pane inspection.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Implement "Option 3" dual logging pattern:
Claude Code can autonomously read both outputs without user intervention.
Use this skill when:
MT5 logs are stored at:
$MQL5_ROOT/Program Files/MetaTrader 5/MQL5/Logs/YYYYMMDD.log
File Format:
/usr/bin/env bash << 'SKILL_SCRIPT_EOF'
# Determine current date
TODAY=$(date +"%Y%m%d")
# Build absolute path
LOG_FILE="$MQL5_ROOT/Program Files/MetaTrader 5/MQL5/Logs/${TODAY}.log"
SKILL_SCRIPT_EOF
Use Read tool:
Use Grep to filter entries:
Pattern: indicator name, "error", "test.*passed", etc.
Path: Log file path from step 1
Output mode: "content" with -n (line numbers)
Context: -A 5 for 5 lines after matches
Use Bash with tail for latest output:
tail -n 50 "$LOG_FILE"
Search for test pass/fail indicators:
Pattern: test.*passed|test.*failed|Tests Passed|Tests Failed|ALL TESTS PASSED
Output mode: content
Context: -B 2 -A 2
Pattern: error|ERROR|warning|WARNING|failed to create
Output mode: content
Context: -A 3
Pattern: CCI Rising Test|PatternDetector|ArrowManager
Output mode: content
Context: -A 2
Pattern: OnInit|initialization|Initialization complete|Phase \d+
Output mode: content
Input: User compiled Test_PatternDetector.mq5
Action:
1. Read today's log file
2. Grep for "Test.*PatternDetector|Tests Passed|Tests Failed"
3. Report results (e.g., "17 tests passed, 0 failed")
Output: Test status without user checking Experts pane
Input: User reports indicator not working
Action:
1. Read today's log file
2. Grep for "ERROR|error|failed" with -A 3 context
3. Analyze error messages
Output: Specific error details and line numbers
Input: User asks "did the test arrow get created?"
Action:
1. Read today's log file
2. Grep for "Phase 2|Test arrow created|Failed to create"
3. Check for success/failure messages
Output: Arrow creation status with timestamp
This skill enables programmatic access to one half of the dual logging pattern:
Both are accessible without user intervention:
When using this skill:
docs/guides/MT5_FILE_LOCATIONS.mddocs/plans/cci-rising-pattern-marker.yaml Phase 3-4Program Files/MetaTrader 5/MQL5/Indicators/Custom/Development/CCINeutrality/lib/CSVLogger.mqh| Issue | Cause | Solution |
|---|---|---|
| Log file not found | Wrong date or path | Verify YYYYMMDD.log format and MQL5_ROOT env var |
| Empty log file | MT5 not running or no output | Ensure MT5 is running and Print() is being called |
| Encoding errors | UTF-16LE not handled | Read tool handles encoding automatically |
| Missing test results | Test not executed | Compile and run test script in MT5 first |
| Grep finds nothing | Wrong pattern | Use case-insensitive (-i) or broader pattern |
| Old log data | Log rotation | Each day creates new YYYYMMDD.log file |
| Path contains spaces | Unquoted path variable | Quote paths: "$LOG_FILE" |
| Sensitive data exposed | Trading info in logs | Filter sensitive fields when reporting to user |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mt5, metatrader-5, log-reading, debug-output, expert-advisor
/mql5:log-readerfrom mql5
npx claudepluginhub terrylica/cc-skills --plugin mql56 skills in this plugin
/article-extractorExtract MQL5 articles and documentation. TRIGGERS - MQL5 articles, MetaTrader docs, mql5.com resources./fxview-parquet-consumerConsume FXView tick data from Parquet files. Schema, file layout, DuckDB queries, Python/Rust examples./mql5-indicator-patternsMQL5 indicator development patterns. TRIGGERS - MQL5 indicator, OnCalculate, indicator buffers, MetaTrader 5./python-workspacePython workspace for MQL5 integration. TRIGGERS - MetaTrader 5 Python, mt5 package, MQL5-Python setup./tick-collection-opsOperate and troubleshoot the MT5 tick collection system. HOST MOVED 2026-08-07 - MT5 now runs on the FXView VPS (Windows scheduled tasks, C:\odb-tickrings), NOT <gpu-host>/Linux-Wine/systemd. EA, ring format and gap-detection reasoning unchanged. Covers gap detection, restart recovery, daily ops.Other plugins' skills for the same job