MT5 Prop Firm EA with Daily Loss Guard
A London-session MetaTrader 5 Expert Advisor rebuilt around hard drawdown controls, spread filters, and audit logs for funded account rules.
Problem and business goal
- Problem
- The trader had a profitable discretionary setup but missed valid entries and occasionally exceeded daily risk during high-volatility sessions.
- Business goal
- Pass a funded account evaluation without manual rule breaches or missed London-session entries.
Architecture
- Signal module
- Prop rule risk gate
- MQL5 CTrade execution
- Structured CSV logs
- VPS health checks
Technology stack
- MQL5
- MetaTrader 5 Strategy Tester
- VPS monitoring
- CSV audit logs
Development challenges
- Aligning broker server time with London session rules.
- Handling spread spikes without blocking valid low-spread entries.
- Pausing trading before the account reached the firm’s hard daily loss limit.
Implementation
- Converted the manual checklist into deterministic entry, exit, and invalidation rules.
- Added a pre-trade risk gate that rejects orders when daily loss, spread, session, or max-trade limits are breached.
- Created log events for every rejected and accepted trade so the client could audit decisions after each session.
Results
- Daily loss breaches stopped during the forward-test window.
- Valid London-session setups executed consistently without manual intervention.
- The client had evidence logs to review each rule decision after trading hours.
Lessons learned
- Prop firm automation is mostly risk engineering, not just signal automation.
- The EA should fail closed when server time, symbol specs, or account equity cannot be verified.
Frequently asked questions
Can prop firms detect this kind of EA?
A compliant EA should not try to hide. The safer approach is to respect the firm’s rules, avoid prohibited behavior, and keep clean execution logs.
Was profitability guaranteed?
No. The project improved execution discipline and rule compliance. Market performance still depends on the underlying strategy.