Техническое задание
Description:
I need a professional MetaTrader 5 developer to build a clean, fully editable Expert Advisor (EA) that strictly controls risk based on dollar-loss thresholds per lot size, and includes hard rules for equity protection and trade limits.
Trade Management Rules
1. Dollar-Based Auto Close (Per Lot Size)
The EA must close each individual XAUUSD trade once its loss in USD reaches a specific threshold tied to the lot size:
Lot Size | Max Dollar Loss |
0.01 | 4 USD |
0.02 | 7 USD |
0.03 | 9 USD |
0.04 | 12 USD |
0.05 | 15 USD |
0.06 | 20 USD |
0.07 | 25 USD |
0.08 | 30 USD |
Hard Risk Limits (Live Enforcement)
1. No trade larger than 0.08 lots is allowed
2. No more than 3 trades per lot size
3. No more than 10 total open trades at any time
Strict Trade Lock Mechanism
If the user opens 10 trades (even if some get closed manually or by SL), the system must:
- Block any new trades until all 10 are fully closed
- Only after all 10 trades are closed, the EA allows new trades to be opened
Equity Protection System
1. At 00:00 SAST (UTC+2) daily, the EA must:
- Record that day’s baseline equity
- Reset trade lock and allow fresh trading
2. During the day, if current equity drops by $300 or more compared to the day’s baseline:
- Close all open trades immediately
- Block all new trades until the next 00:00 reset
3. The $300 equity loss threshold must be user-editable
Other Requirements
- The EA must only apply to XAUUSD
- It must function even when trades are placed manually via mobile app or other terminals
- All parameters (dollar thresholds, equity lock, etc.) must be adjustable in the input panel
- The EA must run silently — no alerts, no popups, no GUI
- Code must be fully commented and cleanly structured
- Must compile and run with zero errors/warnings on MT5 Build 5135
Deliverables
- Fully functional DollarRiskManager.mq5 (editable source code)
- Compiled DollarRiskManager.ex5
- All parameters explained
- Step-by-step install instructions
I will test the EA live before releasing funds. Please only apply if you understand and can implement these rules exactly as listed above.