Specification
MT4 Expert Advisor for Volume Generation via Hedging (Rebate-Focused EA)
Project Goal:
To develop a fully automated MT4 Expert Advisor that generates high trading volume on XAU/USD (Gold) for the purpose of earning broker rebates — not trading profits. The EA must operate with minimal or zero market exposure using a hedging strategy that cycles simultaneous BUY and SELL positions safely and efficiently.
Key Requirements:
-
Hedging Logic:
-
Open and manage simultaneous BUY and SELL positions
-
Cycle through opening/closing trades to create consistent volume
-
Maintain near-zero net exposure at all times
-
-
Net-Zero Closure Logic (Break-Even Engine):
-
Ensure closed trades result in net-zero or positive outcome
-
E.g., if BUY closes at +$5.50, only close enough of SELL to match the loss of −$5.50 or better
-
-
Daily Profit-Based Trigger (Conditional Activation):
-
EA activates only if a user-defined daily profit (e.g., +50€) is reached
-
Deactivates if condition is no longer met
-
-
Time Filters:
-
Prevent trading during risky sessions like Sunday open, rollover (23:00–00:00), and Friday close
-
Inputs: StartHour, EndHour, FridayStopHour
-
-
News Filter:
-
Block new trades around high-impact economic news events (e.g., NFP, FOMC)
-
Integration with trusted calendar API (e.g., Forex Factory or broker feed)
-
Inputs: BlockBeforeNewsMinutes, BlockAfterNewsMinutes, Impact level, Currency filter
-
-
Risk Management:
-
Emergency stop for high spread, slippage, or drawdown
-
Real-time exposure monitoring
-
Position timeout controls and daily loss limits
-
-
User Interface (GUI):
-
Start/Stop controls
-
Real-time stats: spread, exposure, trade volume, rebate estimate, etc.
-
Input parameters: lot size, time filters, news filters, profit trigger, etc.
-
Platform: MT4 (MQL4)
Symbol Focus: XAU/USD
Spread Range: Works within ~25-point spread
Deliverables:
-
Fully functional EA in .ex4 and source code (.mq4)
-
User guide/documentation for inputs and usage
-
Basic testing support to confirm functionality
-
Optional: Compatibility consideration for later MT5 conversion