I need a professional MQL5 Expert Advisor for SP500ft futures
on MetaTrader 5 with hedging account (Infinox demo).
STRATEGY LOGIC:
- At each new D1 bar (00:00 UTC), place two pending orders:
BuyStop at open + cooldown% | SL = open D1
SellStop at open - cooldown% | SL = open D1
- Order execution IS the entry signal
- On execution → activate full management:
Phase 0: auto breakeven at broker minStop distance
Phase 1: TP1 closes 50% at cooldown×2
Phase 2: trailing stop on remainder
- When price returns to D1 open → replenish missing orders
- If SL or trailing closes → replenish missing orders immediately
- Daily close at 23:30 UTC Mon-Thu and Friday
TECHNICAL REQUIREMENTS:
- MQL5, MT5 only
- Hedging account compatible (PositionSelectByTicket)
- ORDER_FILLING_RETURN for pending orders
- Dynamic filling mode detection for market orders
- Magic number, configurable parameters
- No static variables inside OnTick()
- VPS-safe: robust restart recovery
- Source code required
CONFIGURABLE PARAMETERS:
- NotionalEUR (position sizing in EUR)
- CooldownPct (%)
- TP1ClosePct (%)
- DailyTargetEUR
- TrailPoints
- MaxSpread
- MagicNumber
- FridayCloseHour/Min
Symbol: SP500ft (futures, not CFD)
Broker: Infinox, hedging mode, London LD4 VPS
Budget: open to proposals
Delivery: source code (.mq5) + compiled (.ex5)