Topics: metatrader5, mql5, prop-firm, expert-advisor, mql4, metatrader, forex-trading, automated-trading, risk-management, multi-account, prop-trading, copy-trading, drawdown-protection, mt4, mt5, trading-bot, mt5-kill-switch, prop-firm-risk-engine, multi-account-drawdown-guard
A multi-account risk command center for prop trading and MetaTrader 5 style terminal fleets. It tracks account equity, drawdown, exposure, command acknowledgements, chart-line copy events, and global kill-switch actions from one Windows desktop dashboard.
Prop firm trading requires strict control over drawdown, exposure, account consistency, and emergency shutdown behavior. Prop Matrix Engine models that control layer as a dedicated operator dashboard, with clear account tables, order command history, risk thresholds, and a global kill switch.
It is useful for:
- Prop trading risk-control prototypes
- Multi-account MT5 monitoring tools
- Trade copier command center concepts
- SignalR terminal integration experiments
- Risk engine and kill-switch UI portfolios
| Module | Description |
|---|---|
| Account Registry | Tracks connected terminal clients and latest account snapshots |
| Risk Engine | Aggregates global equity and evaluates drawdown thresholds |
| Kill Switch | Dispatches close positions, cancel pending orders, and disable trading commands |
| Chart-Line Copy | Converts chart-line events into replicated pending orders |
| Account Grid | Displays balance, equity, floating P/L, exposure, status, and last tick |
| Command Grid | Logs trade command results with timing and success status |
| Event Log | Shows operator and system activity in real time |
| Feature | Detail |
|---|---|
| Multi-Account Dashboard | Add multiple MT5-style accounts and watch them together |
| Global Drawdown Guard | Tracks total equity against daily peak equity |
| Pre-Breach Buffer | Fires before the formal drawdown limit is fully reached |
| Auto Kill Switch | Optional automatic shutdown when risk limits are hit |
| Manual Kill Switch | One button to close positions, cancel pending orders, and disable trading |
| Chart-Line Replication | Turns source account chart lines into target pending orders |
| SignalR Client Mode | Includes a real-time hub client for terminal integrations |
| Simulation Mode | Ships with a simulated MT5 client for demos and UI testing |
Account snapshots
|
v
Total equity + daily peak equity
|
v
Drawdown percentage
|
+-- Below threshold -> Risk Engine: Armed
|
+-- At pre-breach level -> KillSwitchRequired event
Default risk controls:
| Control | Default |
|---|---|
| Daily drawdown limit | 5.00% |
| Pre-breach buffer | 0.50% |
| Copy lot size | 0.10 lots |
| Auto kill switch | Enabled |
| Copy chart lines | Enabled |
The engine supports two terminal client styles:
SignalR Client
- Connects to a remote hub
- Receives AccountSnapshot events
- Receives ChartLineChanged events
- Sends trade commands
Simulated Client
- Generates equity drift
- Emits chart-line events
- Accepts kill-switch commands
- Useful for demos and screenshots
When the global kill switch fires, the registry dispatches:
1. CloseAllPositions
2. CancelAllPendingOrders
3. DisableTrading
Each response is tracked in the command grid with account ID, command type, success flag, elapsed time, and message.
Requirements:
- Windows 10 or Windows 11
- .NET 8 SDK
- Visual Studio 2022
git clone https://github.com/your-username/prop-matrix-engine.git
cd prop-matrix-engineOpen WinFormsApp4.slnx in Visual Studio and press F5.
- Launch the dashboard.
- Enter an MT5 ID and password.
- Select the target server profile.
- Click Add MT5 Account.
- Adjust daily drawdown limit, pre-breach buffer, and copy lot size.
- Monitor account equity and exposure.
- Use GLOBAL KILL SWITCH when risk must be reduced immediately.
- Multi-account registry
- Global risk evaluation
- Kill-switch command sequence
- Chart-line copy engine
- SignalR client adapter
- Add persistent account profiles
- Add broker-specific MT5 bridge adapter
- Add audit export to CSV
- Add role-based operator lock
MIT
Prop Matrix Engine - Multi-Account MT5 Risk Command Center
