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.
This commit is contained in:
58
UTILS.md
Normal file
58
UTILS.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# 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).
|
||||
|
||||
```bash
|
||||
./view-report.sh /path/to/ReportHistory-XXXX.html
|
||||
```
|
||||
|
||||
### parse-deals.py
|
||||
Parse MT5 binary deal files to extract trading data.
|
||||
|
||||
```bash
|
||||
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.
|
||||
|
||||
```bash
|
||||
./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
|
||||
```
|
||||
Reference in New Issue
Block a user