Files
mql-trading-bots/UTILS.md
Garfield 9575c5ed76 Add MT5 helper utilities
- view-report.sh: Read HTML reports without browser
- parse-deals.py: Extract data from binary deal files
- export-history.sh: Safe export guide
- UTILS.md: Documentation for tools

Prevents VM crashes when accessing trading data.
2026-03-21 19:09:24 -04:00

1.3 KiB

MT5 Helper Utilities

This directory contains helper scripts for managing MT5 trading and extracting data safely.

Scripts

view-report.sh

View MT5 HTML trading reports without browser (prevents VM crash).

./view-report.sh /path/to/ReportHistory-XXXX.html

parse-deals.py

Parse MT5 binary deal files to extract trading data.

python3 parse-deals.py

Output: Account summary with P&L, trade counts, win/loss stats.

export-history.sh

Guide for safely exporting trade history from MT5.

./export-history.sh

Why These Are Needed

MT5 in Wine/VM crashes when generating reports because:

  1. MT5 tries to open HTML in default browser
  2. No browser installed in Wine environment
  3. Browser launch fails → VM crash

These scripts work around that limitation.

Report File Locations

Binary Data (Internal)

~/mt5-docker/config/.wine/drive_c/Program Files/MetaTrader 5/Bases/
├── MetaQuotes-Demo/trades/104125640/deals_2026.03.dat
├── MetaQuotes-Demo/trades/103477358/deals_2026.02.dat
└── ...

HTML Reports (User Generated)

~/mt5-docker/config/.wine/drive_c/users/abc/Desktop/ReportHistory-XXXX.html

Text Logs

~/mt5-docker/config/.wine/drive_c/Program Files/MetaTrader 5/MQL5/Logs/YYYYMMDD.log
~/mt5-docker/config/.wine/drive_c/Program Files/MetaTrader 5/logs/YYYYMMDD.log