Specifiche
FREELANCER JOB ORDER: DEVELOPMENT OF A MULTI-ASSETS EXPERT ADVISOR (EA)
1. Project Title
Development of a Professional, Configurable MT5 Expert Advisor for Forex, Gold, Silver and Commodities
2. Project Overview
I am seeking an experienced MQL5 developer to design and develop a professional automated trading system (Expert Advisor) for MetaTrader 5 (MT5).
The EA must be designed to operate across multiple instruments, including Forex currency pairs, gold (XAUUSD), silver (XAGUSD), and other supported metals and commodities.
The primary objective is to develop a systematic, risk-controlled EA that can identify high-quality trading opportunities, manage trades automatically, and protect the account with robust loss-management rules.
The EA must be fully configurable through a simple input panel, allowing me to select entry strategies, timeframes, indicators, risk percentages, trading sessions, stop-loss and take-profit rules, and other parameters without modifying the source code.
The project must prioritise capital preservation, disciplined execution, transparent reporting, and long-term performance rather than aggressive trading or unrealistic profit promises.
3. Platform and Technical Requirements
- Platform: MetaTrader 5.
- Programming language: MQL5.
- Deliverables: compiled .ex5 file and complete editable .mq5 source code.
- Multi-symbol functionality with configurable symbol selection.
- Automatic lot-size calculation based on risk and instrument specifications.
- Adaptable to different account sizes and broker specifications.
- Suitable for Strategy Tester backtesting, demo testing, and forward testing.
The EA must detect instrument specifications, tick values, tick sizes, contract sizes, volume limits, minimum stop distances, trading hours, and supported order types rather than assuming every instrument behaves like a Forex pair.
4. Preselectable Entry Strategies
The EA must include the following entry strategies as independent modules. I must be able to enable or disable each strategy and select which ones are permitted to trade.
Strategy A — Trend Following
- Fast and slow EMA crossover or alignment.
- Higher-timeframe trend confirmation.
- ADX filter to identify sufficient trend strength.
- Optional pullback entry before a new position is opened.
- Configurable EMA periods, ADX period, and minimum ADX threshold.
- Buy and sell signals handled independently.
Strategy B — Breakout Trading
- Detect support and resistance zones.
- Identify breakouts from recent highs, lows, or defined trading ranges.
- Optional candle-close confirmation.
- ATR-based volatility filter to reduce false breakouts.
- Optional retest confirmation before entry.
- Configurable breakout lookback period and confirmation settings.
Strategy C — Pullback and Continuation
- Identify the prevailing trend using EMA alignment.
- Wait for a pullback to a configurable EMA or price zone.
- Require a selectable confirmation indicator or candle pattern.
- Enter in the direction of the prevailing trend.
- Allow the trader to configure the required confirmation conditions.
Strategy D — Momentum Confirmation
- Use RSI, ADX, MACD, or other selectable momentum indicators.
- Allow the user to choose which indicators are required.
- Provide configurable overbought, oversold, momentum, and trend thresholds.
- Prevent entries when mandatory confirmation conditions are not satisfied.
Strategy E — Optional Range Trading
- Detect sideways markets using configurable volatility and trend-strength filters.
- Identify potential entries near defined range boundaries.
- Require a confirmation signal before entry.
- Include a maximum spread and minimum risk-to-reward filter.
Range trading must be independently selectable and disabled by default until validated through testing.
Entry Logic Requirements
The EA must support three selectable modes:
- Single strategy: only one selected strategy may generate entries.
- Confluence mode: require a configurable number of selected conditions to agree.
- Multi-strategy mode: allow multiple enabled strategies to trade, subject to the same risk limits and duplicate-signal protections.
All entry rules must be visible and documented. The EA must not open a trade merely because an indicator has reached a particular value; it must follow the selected entry conditions and risk checks.
5. Technical Indicators and Adjustable Inputs
- EMA: fast period, slow period, and trend timeframe.
- ADX: period and minimum trend-strength threshold.
- ATR: period, volatility filter, stop-loss multiplier, and trailing-stop multiplier.
- RSI: period and selectable buy/sell thresholds.
- MACD: fast, slow, and signal periods.
- Optional support/resistance, candlestick confirmation, and breakout filters.
- Optional higher-timeframe confirmation.
- Optional minimum candle-body or momentum threshold.
Each indicator must have an enable/disable setting. The EA must permit different parameter presets for gold, silver, Forex, and other supported instruments.
6. Risk Management and Account Protection
The EA must contain a dedicated risk-management engine that operates independently of the entry strategies. No entry strategy may bypass these controls.
A. Account Configuration
Provide selectable configuration for custom accounts, including risk limits and safety buffers.
B. Maximum Daily Loss Protection
- Track daily starting balance and the applicable daily loss threshold.
- Calculate current equity including open floating profit/loss.
- Include a configurable safety buffer below the breach threshold.
- Stop opening new trades when the safety threshold is reached.
- Optional: close open EA-managed positions before the breach threshold is reached.
- Prevent further trading until the next permitted trading day.
C. Maximum Overall Loss Protection
- Track the applicable maximum loss limit.
- Monitor equity continuously.
- Stop trading before the configured safety threshold is breached.
- Provide an emergency protection function for EA-managed trades.
D. Position Sizing
- Calculate position size automatically using the actual stop-loss distance, instrument specifications, account currency, and selected risk percentage.
- Required selectable risk levels: 0.25%, 0.50%, 0.75%, 1.00%, and custom.
- Never increase lot size to recover losses.
E. Additional Risk Controls
- Maximum risk per trade idea.
- Maximum simultaneous positions.
- Maximum total open risk.
- Maximum daily loss in money and percentage.
- Maximum consecutive losing trades.
- Maximum trades per day.
- Maximum spread filter.
- Maximum slippage setting where supported.
- Maximum permitted lot size.
- Daily profit target and optional daily trading lock.
- Emergency stop and manual trading disable switch.
- Optional equity-based protection that closes EA-managed positions.
- Correlated-instrument exposure limits.
- Protection against duplicate orders and repeated entries on the same signal.
Mandatory rule: If the EA cannot determine whether a new trade would breach the configured risk limits, it must reject the trade and log the reason.
7. Stop-Loss, Take-Profit and Trade Management
- Every position must have a valid protective stop-loss at entry.
- Required options: Fixed stop-loss and take-profit, ATR-based stop-loss, structure-based stop-loss.
- Configurable risk-to-reward ratios: 1:1, 1:1.5, 1:2, 1:3, or custom.
- Break-even stop after a configurable profit threshold.
- Trailing stop based on ATR, EMA, or fixed distance.
- Optional partial profit-taking, maximum holding time, and exit on opposite signal.
- Maximum time allowed for an order to remain pending.
- Correct handling of rejected orders and stop modifications.
8. Multi-Asset Compatibility
The EA must work with:
- Forex: major, minor, and available exotics.
- Precious metals: XAUUSD and XAGUSD.
- Other metals, energy commodities, and other supported instruments.
The EA must handle broker-specific symbol suffixes/prefixes, different tick sizes, contract sizes, lot steps, and trading sessions.
Include a symbol-selection panel for active instruments.
9. Trading Sessions and Economic News Filters
- Configurable trading sessions: Asian, London, New York, overlap, and custom.
- Separate session settings per instrument.
- Automatic handling of daylight-saving changes where feasible.
- Configurable no-trade periods around market openings, closings, and rollover.
- Optional economic-news filter with fail-safe handling.
- Configurable restrictions around scheduled market closures and abnormal volatility.
10. Compliance Safeguards
The EA must avoid:
- Martingale or grid-based loss recovery.
- Latency or price-feed exploitation.
- Excessive order activity.
- Uncontrolled risk or averaging down.
Must implement legitimate, risk-controlled trading practices.
11. User-Friendly Settings Panel
- Organised panel with clear descriptions and logical grouping.
- Ability to save and load named presets such as Conservative, Balanced, and Custom.
- Dashboard displaying account equity, balance, daily profit/loss, remaining loss allowance, open risk, current positions, selected strategy, and trading status.
12. Backtesting and Performance Validation
- Historical and forward testing across multiple market conditions and instruments.
- Tests for different timeframes, volatility periods, and losing streaks.
- Spread, commission, swap, and slippage sensitivity testing.
- Verification of risk management functions and position sizing.
- Provide reports with net return, drawdown, profit factor, win rate, average trade stats, and risk enforcement evidence.
13. Deliverables
- Complete, compiled MT5 EA (.ex5).
- Complete editable MQL5 source code (.mq5).
- All required custom indicator source files.
- User manual.
- Installation and configuration guide.
- Strategy and risk-management documentation.
- Named parameter presets.
- Backtesting reports.
- Demonstration of the EA operating on a demo account.
- Evidence that loss-limit safeguards have been tested.
- List of any third-party dependencies and their costs.
- Post-delivery bug fixes for an agreed period.
14. Freelancer Qualifications
- Strong MQL5 and MT5 development experience.
- Previous multi-symbol EA projects.
- Experience implementing risk engines and equity protection.
- Knowledge of position sizing for metals, commodities, and Forex.
- Proven backtesting and forward-testing capability.
- Willingness to explain code and demonstrate the EA.
15. Project Milestones and Payment
Milestone 1 — Specification and architecture: Agree on entry logic, risk controls, and input-panel layout.
Milestone 2 — Core EA and risk engine: Deliver a testable version with position sizing, protective stops, and one entry strategy.
Milestone 3 — Strategy modules and multi-asset support: Implement remaining strategies, symbol handling, sessions, filters, and presets.
Milestone 4 — Backtesting and compliance testing: Provide reports and demonstrate risk protections.
Milestone 5 — Final delivery: Deliver source code, compiled EA, documentation, presets, and installation support.
16. Acceptance Criteria
- EA compiles without errors.
- All agreed strategies operate according to documented rules.
- Strategy and risk settings can be changed without editing source code.
- Lot sizes calculated correctly for each supported instrument.
- Daily and overall loss protections function correctly.
- EA stops trading when safety locks are activated.
- Handles symbol differences, trading hours, and execution errors correctly.
- Backtesting and forward-testing documentation is supplied.
- Complete source code and deliverables are handed over.
17. Final Objective
A professional, modular, and easy-to-use trading EA that enables systematic trading across Forex, gold, silver, and commodities while prioritising capital preservation, transparent risk management, and robust performance.