A desktop order-flow terminal for MetaTrader 5. It takes a live depth-of-market feed and renders the two views tape readers actually work from — a volume heat map of the book and a time-and-sales tape — with an alert engine watching for the events you would otherwise have to catch by eye.
Built with PySide6 and pyqtgraph, so the plotting runs natively rather than in an embedded browser.
Market depth heat map — bid and ask volume at every price level, coloured by size, updating on a configurable interval (50 ms by default, up to 20 levels either side of the mid). The colour scheme, scaling and price precision are all configurable.
Tape reader — real-time trade executions as a time-and-sales panel, with filtering and highlighting so large prints stand out from the noise.
Alerts — four conditions, each with its own thresholds and priority:
| Alert | Fires on |
|---|---|
| Large trade | A single execution above a size threshold |
| Volume spike | Traded volume jumping against its recent baseline |
| Price movement | A move beyond a configured distance in a window |
| Liquidity imbalance | Bid and ask depth diverging past a ratio |
Alerts can raise an audible notification as well as an on-screen one.
MetaTrader 5 → mt5_connector → data_broker → heat map widget
│ tape reader widget
│ alert system
└────────→ data_logger (SQLite)
core/mt5_connector.py— connection, symbol subscription, reconnection.core/data_broker.py— the central async hub. Every UI component subscribes here rather than polling the terminal, so one feed serves the whole window.core/data_processor.py— turns raw ticks and depth snapshots into the aggregates the widgets draw.core/alert_system.py— evaluates conditions against each update.core/data_logger.py— SQLite persistence for ticks and depth, so a session can be replayed or analysed after the fact.config/settings.py— dataclass-backed configuration with YAML/JSON persistence, covering connection, display and data-retention settings.models/—tick_data,market_depthandalert_configtypes shared across the layers.
- Windows. The official
MetaTrader5Python package is Windows-only, and the terminal itself has to be installed and logged in. - Python 3, with the packages in
requirements.txt(PySide6, pyqtgraph, numpy, pandas, MetaTrader5, pygame for audio alerts).
pip install -r requirements.txtpython main.pyConnection details go in the settings dialog, or directly into the config file
under MT5Config — server, login, and whether to connect on launch.
launcher_minimal.py starts a reduced window, which is useful for checking a
connection without the full layout.
python -m pytest tests/Covers the data processor, the heat map widget and the MT5 connector.
This is a visualisation and alerting tool. It reads from MetaTrader 5 and it does not place, modify or cancel orders — there is no execution path in the codebase at all.