Custom MT5 Expert Advisor – Developer Specification
1. Project Objective
Develop a fully autonomous, custom MetaTrader 5 Expert Advisor (EA) using native MQL5.
The EA must independently analyze financial markets, generate its own trading signals, evaluate opportunities, execute trades, and manage open positions without requiring an external signal provider, another trading bot, or manual intervention.
The EA must combine multiple trading strategies into one intelligent hybrid trading system.
It must support two FTMO account configurations:
- $200,000 FTMO 2-Step Challenge account.
- $25,000 FTMO 2-Step Swing account.
The EA must automatically adapt its risk calculations and position sizing to the actual account balance and equity. Account-specific risk settings must be configurable.
2. Independent Signal Generation
The EA must have its own internal signal-generation engine.
It must:
- Continuously scan the configured instruments.
- Identify potential BUY and SELL opportunities.
- Evaluate each opportunity using a weighted confluence scoring system.
- Reject opportunities that fail mandatory technical or risk filters.
- Execute qualifying signals automatically.
- Manage and close positions independently.
No external signal provider should be required.
The EA must distinguish between a generated signal and an executed trade. A signal becomes an actual position only after all technical, execution, and risk requirements are satisfied.
3. Instruments and Timeframes
Initial instruments:
- 10 most profitable forex currency pairs.
- XAUUSD (Gold).
Support broker-specific symbol suffixes and prefixes.
Configurable timeframe architecture:
- D1: Overall market direction.
- H4: Major market structure.
- H1: Directional confirmation.
- M15: Setup identification.
- M5: Entry confirmation.
The developer should make instruments and timeframes configurable.
4. Hybrid Trading Strategy
Combine the following strategies into one scoring and decision-making engine.
A. Market Structure
- Higher highs and higher lows.
- Lower highs and lower lows.
- Break of Structure (BOS).
- Change of Character (CHOCH).
- Trend identification.
- Multi-timeframe alignment.
B. Smart Money Concepts
- Buy-side and sell-side liquidity.
- Liquidity sweeps.
- Equal highs and equal lows.
- Order blocks.
- Fair Value Gaps (FVG).
- Displacement.
- Premium and discount zones.
C. Trend Following
- EMA alignment and slope.
- ADX trend strength.
- Multi-timeframe trend confirmation.
- Pullback and continuation entries.
D. Breakout Trading
- Asian session range.
- London and New York breakouts.
- Breakout confirmation.
- Retest entries.
- False breakout detection.
E. Reversal Trading
- Liquidity sweep and rejection.
- Momentum exhaustion.
- RSI divergence.
- Structural reversal confirmation.
F. Momentum and Volatility
- RSI.
- MACD.
- ATR.
- ADX.
- Candle strength.
- Volatility expansion and contraction.
- Tick volume where supported.
The EA must evaluate the combined evidence rather than blindly execute signals from individual indicators.
5. Confluence Scoring System
Use a weighted scoring model from 0 to 100.
Initial proposed weighting:
| Component | Weight |
| Higher-timeframe trend | 20 |
| Market structure | 20 |
| Liquidity and SMC | 15 |
| Breakout/pullback confirmation | 15 |
| Momentum | 10 |
| Volatility | 5 |
| Trading session | 5 |
| Volume/activity | 5 |
| Spread/execution quality | 5 |
| Total | 100 |
Entry requirements:
- Minimum score: 82/100.
- A+ opportunity: 90/100 or higher.
Both thresholds must be configurable.
Mandatory filters and risk controls must override the score. A high score must never bypass a risk restriction.
The developer must explain how the score is calculated, how conflicting signals are handled, and how the scoring model will be validated without overfitting.
6. Multiple Positions and Repeated Gold Entries
The EA must support:
- Maximum 8 simultaneous open positions across the portfolio.
- Maximum 4 positions in the same currency direction, configurable.
- Multiple simultaneous XAUUSD positions.
- Configurable maximum positions per instrument.
- Separate evaluation of every new entry opportunity.
Important: No blanket one-position-per-symbol restriction.
For example, if the EA already has two open XAUUSD positions, it must still be allowed to open a third, fourth, or additional position when a new independent opportunity meets the required confluence score and all risk requirements.
Gold must be treated as a priority instrument for repeated opportunity detection, not as an exception to risk management.
The EA must:
- Allow multiple valid entries in the same direction.
- Allow new entries when an existing position is profitable or protected, provided portfolio risk permits.
- Avoid opening duplicate orders from the same signal or repeated processing of the same candle.
- Identify genuinely new entry opportunities, including new pullbacks, breakouts, liquidity events, and confirmations.
- Allow configurable minimum spacing between entries.
- Support separate stop-loss and take-profit levels for each position.
- Calculate combined exposure and potential loss across all gold positions.
- Prevent uncontrolled stacking during adverse price movement.
A new independent signal must not be rejected merely because another position on the same instrument is open.
7. Risk Management and Account Profiles
The EA must support separate configurable profiles.
Profile A: FTMO $200,000 2-Step Challenge
Initial proposed settings:
- Base risk: $350 per trade.
- A+ risk: $450 per trade.
- Internal daily loss limit: $2,500.
- Maximum simultaneous positions: 8.
- Maximum same-currency-direction positions: 4.
Profile B: FTMO $25,000 2-Step Swing
The EA must automatically scale its risk settings to the smaller account.
Initial proportional risk examples:
- Base risk: $43.75 per trade.
- A+ risk: $56.25 per trade.
The developer must provide configurable settings for both profiles and allow the user to adjust them.
The EA must calculate position size using actual equity, stop-loss distance, symbol contract specifications, tick value, and account currency.
Risk management requirements:
- Fixed-dollar or percentage-based risk modes.
- Automatic position-size calculation.
- Portfolio-wide risk calculation.
- Maximum combined open-position risk.
- Currency and instrument exposure controls.
- Daily, weekly, and maximum drawdown protections.
- Include realized and floating losses in risk monitoring.
- Stop opening new trades when a loss limit is reached.
- Never widen an existing stop-loss to increase risk.
- No martingale.
- No grid-based recovery.
- No uncontrolled averaging down.
- No progressive risk escalation after losses.
- No position without a valid initial stop-loss.
The EA must use the stricter of its internal risk limits and the applicable FTMO restrictions. Verify current FTMO rules for each account type, including daily loss, maximum loss, news restrictions, and swing-account conditions.
The proposed dollar settings must be checked against the actual FTMO account rules before deployment.
8. Trading Sessions
Use UTC-based session configuration:
- Asian: 00:00–05:00.
- London: 07:00–11:30.
- New York: 12:30–17:00.
- Dead zone: 21:00–23:45.
Support daylight-saving adjustments where necessary.
The user must be able to enable or disable individual sessions and configure instrument-specific session preferences.
9. Trade Execution and Management
The EA must independently:
- Open market and pending orders.
- Set mandatory initial stop-losses.
- Calculate take-profit levels.
- Apply configurable risk/reward targets.
- Move stop-loss to break-even.
- Apply trailing stops.
- Partially close positions.
- Close positions based on technical invalidation.
- Support configurable time-based exits.
- Manage each position independently.
Include spread, slippage, execution, and broker-specific symbol checks.
Never increase risk by moving a stop-loss farther away.
10. Economic News Filter
Include a configurable economic calendar filter.
Initial settings:
- 30 minutes before high-impact news.
- 15 minutes after high-impact news.
Identify affected currencies and apply special attention to USD-related news for gold.
The developer must disclose any external calendar API, subscription, or additional cost.
If news data is unavailable, the EA must follow a configurable fail-safe policy rather than silently assuming there is no news.
11. Dashboard
Provide an on-chart dashboard displaying:
- Account balance.
- Account equity.
- Daily realized P&L.
- Floating P&L.
- Daily loss remaining.
- Current drawdown.
- Open positions.
- Available position slots.
- Currency exposure.
- Gold exposure.
- Current trading session.
- Market conditions.
- Active strategy.
- Confluence score.
- Risk per trade.
- News-filter status.
- EA operating status.
Include controls for:
- Enable/disable new entries.
- Close all positions.
- Close selected positions.
- Emergency stop.
- Select account risk profile.
- Adjust risk settings.
Emergency stop and disabling new entries must be separate functions. The user must be able to stop new entries without automatically closing existing positions.
12. Logging and Reporting
Record every executed trade and rejected signal.
Include:
- Date and time.
- Instrument.
- Direction.
- Strategy.
- Entry price.
- Stop-loss.
- Take-profit.
- Position size.
- Dollar risk.
- Confluence score.
- Supporting technical signals.
- Exit reason.
- Final P&L.
Provide daily and weekly performance reports, including performance by instrument and strategy.
13. FTMO Compatibility
The EA must be designed for FTMO account compatibility.
It must detect and accommodate:
- Account currency.
- Balance and equity.
- Symbol specifications.
- Symbol suffixes.
- Contract sizes and tick values.
- Broker execution conditions.
- Account position mode, including hedging or netting.
The developer must verify that multiple independent positions can be supported under the relevant account configuration. If the account uses netting, explain how multiple entries will be represented and managed.
Do not assume that an EA is automatically compliant with FTMO simply because it runs in MT5.
14. Windows Tablet Operation
The EA must run directly in MetaTrader 5 on a Windows tablet.
No VPS should be required for the intended initial deployment.
Requirements:
- Compatible with desktop MT5 running on Windows.
- Automatic initialization when MT5 starts.
- Persistent storage of EA state.
- Recovery after MT5 restart or internet reconnection.
- Duplicate-order prevention after restart.
- Continued monitoring while MT5 is running.
- Efficient multi-symbol scanning without excessive CPU or memory usage.
The developer must document Windows power settings, sleep prevention, MT5 startup, internet connectivity, and recovery procedures.
15. Backtesting and Validation
Before delivery, test the EA using historical data.
Requirements:
- At least 12 months of historical testing where reliable data is available.
- Real-tick testing where available and appropriate.
- Multiple market conditions.
- Individual instrument performance.
- Spread, commission, and slippage assumptions.
Provide:
- Net profit.
- Profit factor.
- Maximum balance drawdown.
- Maximum equity drawdown.
- Win rate.
- Average winning and losing trade.
- Average risk/reward.
- Number of trades.
- Consecutive losses.
- Monthly performance.
- Performance by instrument.
- Performance by strategy.
Also conduct forward testing on an FTMO-compatible demo environment.
Specifically test:
- Eight simultaneous positions.
- Repeated XAUUSD entries.
- Currency exposure limits.
- Daily loss lockout.
- News restrictions.
- MT5 restarts.
- Internet disconnections.
- Emergency stop.
- Both account profiles.
No profitability or FTMO challenge success should be guaranteed. The system must be validated before live deployment.
16. Architecture and Source Code
Use native, modular MQL5 architecture.
Provide editable source code and compiled files.
The project must not depend on undisclosed external services or hidden licensing mechanisms.
All strategy, signal generation, scoring, execution, risk management, and reporting modules must be documented.
17. Deliverables
The developer must provide:
- Complete editable .mq5 source code.
- Compiled .ex5 file.
- All required .mqh files.
- Configuration presets for both FTMO account profiles.
- Installation instructions.
- Windows tablet setup instructions.
- User manual.
- Technical documentation.
- Backtesting reports.
- Forward-testing reports.
- Troubleshooting instructions.
18. Ownership and Exclusivity
The buyer must receive exclusive ownership and rights to the custom-developed project-specific source code, subject to any disclosed third-party components and licenses.
The developer must not:
- Resell the custom EA.
- Distribute the project-specific source code.
- Reuse or share project-specific proprietary code for other clients.
- Install hidden license locks.
- Require undisclosed recurring payments.
- Retain exclusive control over compilation or maintenance.
All source files, configuration files, and necessary documentation must be delivered.
19. Questions the Developer Must Answer Before Starting
- How will the internal signal-generation engine work?
- How will the hybrid strategies be combined and scored?
- How will the EA distinguish a genuinely new gold entry from a duplicate signal?
- How will eight simultaneous positions and repeated gold entries be managed safely?
- How will combined exposure and correlated positions be calculated?
- How will risk automatically scale between the $200,000 Challenge and $25,000 Swing accounts?
- How will FTMO restrictions be incorporated?
- What testing will be performed to reduce overfitting?
- Are any external APIs or recurring subscriptions required?
- What is the development timeline and total cost?
- Will all editable source code be delivered?
- Will exclusive ownership of the custom project-specific code be included in the agreement?