1. Platform & Environment
Platform: MetaTrader 5 (MT5 ONLY)
Language: MQL5
Account type: high spread / Netting or Hedging
Designed for broker rebate/commission return programs
No DLLs, no external dependencies
2. Strategy Overview
The EA is a high-frequency scalping Expert Advisor focused on maximizing the number of trades with minimal price movement, where the main source of profitability is broker rebate rather than market movement.but holding trade for 62 sec
Key characteristics:
Very small TP or time-based exits
Low market exposure
Strong spread & execution control
Optimized for fast execution environments
3. Symbols & Timeframes
Symbols: User-selectable Forex pairs (default majors & minors)
Timeframes:
Default: M1
Optional: M5
EA must be multi-symbol capable OR single-symbol (configurable)
4. Market Filters
Trades are allowed ONLY when:
Current spread ≤ MaxSpread (in points)
Trading session filter allows execution
Optional volatility filter (ATR-based)
If spread exceeds limit:
No new trades
Option to close active trades
5. Signal & Entry Logic
Entry logic must be simple and fast, suitable for MT5 tick-based execution.
Buy Conditions:
Spread condition met
No conflicting open position (or max trades not exceeded)
Optional price action / micro-range condition
Sell Conditions:
Same logic, opposite direction
⚠️ No heavy indicators (to ensure speed & stability).
6. Order Placement (MT5 Trade Model)
Trade type: Market orders
Uses CTrade class
Configurable parameters:
Fixed lot OR auto lot (balance/equity based)
Max open positions
Unique Magic Number
Retry logic in case of trade server errors
Slippage control (deviation points)
All trade actions must be logged
7. Stop Loss & Take Profit
Take Profit:
Small pip TP (user configurable)
Stop Loss:
Fixed OR ATR-based OR optional disabled
Option to close trades by logic instead of TP/SL
8. Position Management
Optional features:
Break-even
Trailing Stop
Time-based trade closing:
Close after X seconds or X bars
Optional global profit close
Optional equity protection close
9. Signal Lifetime
Entry signal remains valid only for:
X seconds OR
X bars
If market conditions change (spread/volatility), the signal is cancelled
10. Closing & Cancellation Logic
Trades must close when:
TP or SL is hit
Max holding time reached
Spread exceeds emergency level
Opposite signal appears (optional)
Risk protection is triggered
11. Risk Management
Daily profit target (stop trading after reached)
Daily loss limit
Max drawdown control
Max trades per day
Margin level protection
12. Inputs & Optimization (MT5 Strategy Tester)
All parameters must be external inputs
Must support:
Genetic optimization
Multi-pass testing
EA must be stable in Every Tick (Real Ticks) testing mode
13. Visualization & Debugging
On-chart display:
Spread
Number of trades
Floating P/L
Log:
Trade execution
Errors
Spread violations
Clean, readable logging
14. Code Quality & Delivery
Clean, well-commented MQL5 code
No warnings or errors on compilation
Source code included (.mq5)
Delivered EA must match specification exactly
15. Testing & Acceptance
Developer must:
Provide MT5 Strategy Tester results
Demonstrate stable execution under varying spreads
Confirm rebate-optimized behavior
✅ Optional Add-Ons (Mention if Needed)
News filter (MT5 economic calendar)
Multi-symbol trading
VPS optimization
Rebate efficiency reporting