Şartname
I am seeking an experienced MQL4 programmer to develop a fully automated, adaptive, and profitable Expert Advisor (EA) specifically designed for trading Gold (XAUUSD) on the MetaTrader 4 (MT4) trading platform.
The objective is to develop a high-frequency scalping EA capable of identifying and executing high-probability trading opportunities across changing market conditions, including trending markets, ranging markets, volatility breakouts, and periods of changing market liquidity.
The EA must be designed for continuous automated operation with minimal manual intervention, providing a practical set-and-forget trading solution after its initial configuration.
I am open to the programmer's professional discretion regarding the trading strategy and technical architecture. However, the finished product must prioritize positive expectancy after trading costs, controlled drawdown, reliable execution, and robust performance across different market conditions.
Total project budget: $110–$120 USD.
The programmer must deliver the complete, editable MQL4 source code and the compiled MT4 Expert Advisor.
2. Core Technical and Trading Requirements
The EA must satisfy the following specifications:
-
Trading Platform: MetaTrader 4.
-
Programming Language: MQL4.
-
Source Code: Complete, editable .mq4 file.
-
Compiled EA: .ex4 file.
-
Primary Trading Instrument: XAUUSD (Gold).
-
Trading Style: High-frequency scalping and short-duration algorithmic trading.
-
Trade Direction: Long and short positions.
-
Target Holding Period: Approximately 1–5 seconds or longer when market conditions justify it.
-
Broker Compatibility: Support different MT4 brokers offering XAUUSD, subject to their execution models and trading restrictions.
-
Maximum Target Spread: Configurable spread filtering supporting the equivalent of up to 40 pips on XAUUSD.
-
Risk Profile: Low-to-medium risk as the primary objective.
-
Performance Target: Aim for 10% or more weekly account growth under favorable conditions, without forcing trades or compromising risk controls.
-
Operating Mode: Fully automated trading with minimal manual intervention.
-
Market Adaptability: Dynamic adjustments to volatility, trend conditions, spread, and execution quality.
-
Position Management: Automated entry, exit, stop-loss, take-profit, and risk management.
-
Strategy Restrictions: No martingale or uncontrolled averaging down.
-
Configuration: User-adjustable inputs and compatible MT4 .set presets.
The developer must correctly account for differences in broker digits, point values, tick sizes, contract specifications, lot sizes, and execution rules.
The EA must use the correct MQL4 trading functions and handle common MT4 execution errors appropriately.
3. Strategy Architecture — Programmer's Discretion
The developer may select, combine, or optimize the trading strategies that provide the strongest evidence of a sustainable statistical advantage.
The following approaches are suggested as potential strategy components rather than mandatory indicators.
A. AI and Neural-Network Integration
Where practical within the project budget, the developer may implement a lightweight machine-learning or neural-network component to classify market conditions and evaluate trading opportunities.
Potential applications include:
-
Market-regime classification.
-
Directional probability estimation.
-
Short-term volatility analysis.
-
Trade-quality scoring.
-
Adaptive entry and exit thresholds.
-
Dynamic stop-loss and take-profit calculations.
-
Filtering low-probability setups.
The programmer may use a more efficient alternative if it offers better performance and reliability within native MQL4.
If an external neural-network library, DLL, Python integration, or other dependency is required, the developer must disclose it before implementation.
The EA must not depend on paid third-party services unless explicitly approved.
AI integration is optional if the developer can demonstrate that a simpler architecture provides a stronger, more practical solution.
B. VWAP-Based Scalping
Consider implementing Volume Weighted Average Price (VWAP) or related price-displacement techniques to identify potential short-term trading opportunities.
Possible applications include:
-
Mean-reversion entries around VWAP.
-
Trend continuation following VWAP acceptance.
-
Price-displacement analysis.
-
Dynamic deviation thresholds.
-
VWAP combined with momentum and volatility filters.
The developer must account for MT4's available price and volume data. Broker-provided tick volume must not be represented as comprehensive exchange-wide Gold trading volume.
C. Volume Spread Analysis
Evaluate Volume Spread Analysis (VSA) or related price-volume techniques to identify potential changes in buying and selling pressure.
Possible components include:
-
Relative tick-volume analysis.
-
Candle-range and closing-location analysis.
-
Momentum exhaustion detection.
-
Breakout confirmation.
-
Price-rejection signals.
Volume-dependent logic must be appropriate for the data available through the broker's MT4 feed.
D. Trend-Following Scalping
Implement a trend-following module for market conditions that favor directional continuation.
Potential components include:
-
EMA and SMA trend alignment.
-
Short-term momentum confirmation.
-
Pullback entries.
-
Volatility-adjusted entries.
-
Breakout continuation.
-
Adaptive trailing stops.
-
Dynamic profit targets.
The EA should avoid repeatedly entering against strong directional momentum when reversal probability is low.
E. Countertrend and Mean-Reversion Scalping
Implement a separate mean-reversion module for suitable ranging conditions or temporary price dislocations.
Potential components include:
-
Bollinger Bands.
-
Standard-deviation channels.
-
VWAP deviations.
-
RSI or other momentum indicators.
-
Reversal confirmation.
-
Volatility-normalized entry and exit levels.
The EA must recognize when market conditions invalidate mean-reversion assumptions, especially during sustained trends and strong breakouts.
F. Volatility Breakout Trading
Consider a breakout strategy designed to capture short-term price expansions.
Potential components include:
-
ATR-based volatility measurements.
-
Range compression detection.
-
Momentum confirmation.
-
Breakout validation.
-
Spread-aware entry filters.
-
Dynamic stop-loss and take-profit placement.
The EA should avoid entering breakouts when estimated transaction costs make the trade's expected net return unattractive.
G. Adaptive Hybrid Strategy Selection
Where feasible, implement a framework that selects an appropriate strategy based on current market conditions.
For example:
-
Trending market: trend-following scalping.
-
Ranging market: mean-reversion scalping.
-
Expanding volatility: breakout trading.
-
Excessive spread: suspend new entries.
-
Abnormal volatility or execution: activate protective filters.
-
Uncertain market conditions: remain flat until a sufficiently strong signal appears.
The programmer may propose a different architecture if it offers a more reliable and cost-effective solution.
4. High-Frequency Execution and Trade Duration
The EA must be optimized for short-duration trades, targeting approximately 1–5 seconds of holding time when market conditions and execution quality permit.
The programmer must account for:
-
Broker execution latency.
-
Bid/ask spread.
-
Commissions.
-
Slippage.
-
Order rejection and requotes.
-
Stop-loss and take-profit execution.
-
Minimum stop distances and freeze levels.
-
Order filling and execution restrictions.
-
Price changes between signal generation and order submission.
The EA must estimate whether a trade has sufficient expected profit to justify its transaction costs.
A short holding period must not be enforced when doing so would require closing an otherwise valid trade prematurely or overriding protective risk controls.
Emergency exits and risk-management closures must always take priority over minimum trade duration.
The programmer must also explain the practical limitations of achieving reliable 1–5-second trading through retail MT4 infrastructure.
The objective is practical, short-duration algorithmic scalping, not an unsupported claim of institutional-grade HFT capability.
5. Adaptive Spread Management and Broker Compatibility
The EA must support configurable spread filtering for different XAUUSD brokers.
Required functionality includes:
-
Real-time spread measurement.
-
Configurable maximum spread.
-
Correct conversion between broker points and the requested pip-equivalent threshold.
-
Automatic adjustment of entry eligibility based on transaction costs.
-
Broker-specific symbol and digit handling.
-
Correct lot-size normalization.
-
Minimum and maximum lot-size validation.
-
ECN/STP execution compatibility where supported.
-
Handling of variable spreads.
-
Detection of abnormal spread expansion.
-
Suspension of new trades when execution conditions become unfavorable.
The EA should support a configurable maximum spread equivalent to 40 pips, but it must not automatically trade at that spread unless the strategy demonstrates a positive expected net return under those conditions.
The developer must document how the EA interprets pips, points, and actual XAUUSD price differences.
The spread filter must be based on actual broker quotes rather than assumptions about a universal Gold spread format.
6. Risk Management and Capital Protection
Risk management is mandatory.
Position Sizing
Implement:
-
Fixed-lot position sizing.
-
Configurable percentage-risk position sizing.
-
Position sizing based on account equity or balance and stop-loss distance.
-
Broker-compliant volume normalization.
-
Protection against invalid or excessive order volumes.
Percentage-risk calculations must account for the instrument's tick value, tick size, contract specifications, and the configured stop-loss distance.
Stop-Loss and Take-Profit
Implement:
-
Configurable stop-loss.
-
Configurable take-profit.
-
ATR-based or other volatility-adjusted stop distances where appropriate.
-
Optional break-even functionality.
-
Optional trailing stops.
-
Risk-reward evaluation.
-
Protection against invalid stop distances.
Account-Level Protection
Include configurable controls for:
-
Maximum daily drawdown.
-
Maximum daily loss.
-
Maximum account drawdown.
-
Maximum simultaneous positions.
-
Maximum open exposure.
-
Maximum consecutive losses.
-
Trading suspension after predefined loss thresholds.
-
Optional trading-session restrictions.
-
Optional news filters where practical.
Risk limits must operate independently of the strategy's entry logic.
Prohibited Risk Practices
The EA must not use:
-
Martingale lot escalation.
-
Unlimited averaging down.
-
Uncontrolled grid trading.
-
Unlimited hedging.
-
Loss-recovery mechanisms that continuously increase exposure.
-
Automatic risk escalation following losing trades.
Grid or hedging functionality is acceptable only if the programmer demonstrates its potential effectiveness, defines strict exposure limits, and explains how the implementation controls drawdown.
Any recovery mechanism must be supported by a defensible trading rationale rather than simply increasing position size to recover losses.
7. Performance Targets and Backtesting
The primary performance objective is to develop an EA capable of pursuing 10% weekly account growth under suitable market conditions while maintaining a low-to-medium risk profile.
This is an aspirational target, not a guaranteed return.
The programmer must prioritize sustainable net profitability, controlled drawdown, and robustness rather than aggressive optimization designed to produce impressive historical results.
The developer must provide evidence addressing the following metrics:
-
Net profit after commissions and estimated transaction costs.
-
Profit factor.
-
Maximum balance drawdown.
-
Maximum equity drawdown.
-
Win rate.
-
Average winning trade.
-
Average losing trade.
-
Expected net profit per trade.
-
Total number of trades.
-
Average trade duration.
-
Maximum consecutive losses.
-
Position exposure.
-
Sensitivity to spreads and slippage.
-
Performance across different market conditions.
-
Out-of-sample results.
Required Testing Procedure
Stage 1: Historical Backtesting
Test the EA using appropriate historical data. Tick-level data should be used where available and appropriate for the strategy.
Stage 2: Out-of-Sample Validation
Evaluate the strategy using market data that was not used to optimize its parameters.
Stage 3: Spread and Slippage Stress Testing
Evaluate the impact of increased spreads, commissions, slippage, and execution delays.
Stage 4: Market-Regime Testing
Evaluate performance during trending, ranging, breakout, and high-volatility periods.
Stage 5: MT4 Demo Forward Testing
Demonstrate the EA's operational functionality and execution behavior on a compatible MT4 demo account.
The developer must distinguish historical simulation from verified live or demo execution results.
A high win rate alone is not sufficient evidence of profitability.
8. True Set-and-Forget Operation
The EA must operate autonomously after its initial configuration, without requiring constant manual intervention.
Required features include:
-
Automatic trade entry and management.
-
Automatic selection of suitable strategy modules where implemented.
-
Adaptive volatility and spread filters.
-
Automatic position sizing.
-
Automated stop-loss and take-profit management.
-
Account-level risk protection.
-
Suspension during unsuitable market conditions.
-
Optional trading-session filters.
-
Logging of trading decisions and execution errors.
-
Recovery from temporary trading interruptions where safe.
-
Clear operating-status indicators.
Adaptive parameters must remain within predefined safety limits.
The EA must never silently increase risk, remove account-protection settings, or escalate position sizes to compensate for losses.
Set-and-forget operation is subject to MT4 remaining operational, the broker connection remaining available, and the underlying VPS or computer functioning correctly.
9. MQL4 Inputs and Configuration Files
The EA must expose its principal operating parameters through the MT4 Expert Advisor Inputs tab.
Include configurable parameters for:
-
Magic Number.
-
Trading symbol and symbol validation.
-
Fixed lot size.
-
Percentage risk per trade.
-
Maximum lot size.
-
Maximum simultaneous positions.
-
Maximum spread.
-
Stop-loss and take-profit.
-
Maximum daily drawdown.
-
Maximum daily loss.
-
Maximum account drawdown.
-
Trading-session restrictions.
-
Strategy-selection settings.
-
Volatility filters.
-
Trailing stops and break-even.
-
Maximum consecutive losses.
-
Trading suspension and recovery behavior.
The developer must supply a default .set file.
If practical, also provide separate conservative, balanced, and aggressive configuration presets. These must be based on the implemented strategy and tested appropriately rather than simply assigning larger lot sizes to the aggressive preset.
10. Required Deliverables
The freelancer must provide:
-
Complete editable MQL4 source code (.mq4).
-
Compiled MT4 Expert Advisor (.ex4).
-
Any custom MQL4 indicator source code required by the EA.
-
Default MT4 .set configuration file.
-
Additional tested presets where practical.
-
Installation and configuration instructions.
-
Documentation explaining the trading strategy and principal parameters.
-
Backtesting reports and supporting evidence.
-
Instructions for configuring spread limits and risk controls.
-
A demonstration of the EA's functionality on an appropriate MT4 demo account.
The source code must correspond to the delivered compiled EA.
The EA must not contain undisclosed expiration dates, hidden account restrictions, or unauthorized licensing mechanisms.
All third-party dependencies, external DLLs, licensing requirements, and recurring costs must be disclosed before implementation.
11. Development Budget
Total fixed-price budget: $110–$120 USD.
I am seeking the most effective practical implementation within this budget.
I recognize that a sophisticated neural-network system with extensive training infrastructure and institutional-grade execution capabilities may exceed the available budget.
Therefore, I am open to a lightweight, native MQL4 solution that emphasizes:
-
A demonstrable statistical trading edge.
-
Reliable order execution.
-
Adaptive trading filters.
-
Robust risk management.
-
Spread and commission awareness.
-
Practical short-duration scalping.
-
Autonomous operation.
-
Complete source-code delivery.
A simpler, well-tested strategy is preferable to an unnecessarily complex AI implementation without credible evidence of improved performance.
Please clearly identify any requirements that cannot reasonably be delivered within the specified budget before beginning development.
12. Required Freelancer Experience
Applicants should have demonstrable experience in:
-
MQL4 programming.
-
MT4 Expert Advisor development.
-
XAUUSD algorithmic trading.
-
High-frequency or short-duration scalping.
-
Tick-data backtesting.
-
Spread, commission, and slippage analysis.
-
Algorithmic risk management.
-
Adaptive trading strategies.
-
MT4 order execution and error handling.
-
Strategy optimization and out-of-sample validation.
Machine-learning experience is desirable but not mandatory if a simpler implementation provides better practical value.
13. Project Acceptance Criteria
The project will be considered functionally complete when:
-
The MQL4 source code compiles without errors.
-
The delivered .ex4 corresponds to the supplied .mq4.
-
The EA correctly evaluates long and short trade signals.
-
Position sizing and account-level risk controls function correctly.
-
Spread filtering and broker-specific calculations work as documented.
-
The EA does not employ martingale or uncontrolled recovery trading.
-
Stop-loss, take-profit, and emergency exits function correctly.
-
The dashboard reports the required operational information.
-
The supplied .set configuration loads correctly.
-
The developer provides reproducible backtesting evidence.
-
The EA passes a functional demonstration on an appropriate MT4 demo account.
Functional acceptance is separate from the aspirational weekly-return objective. Compilation, successful order placement, or a profitable historical backtest alone does not establish that the EA is ready for live trading.
14. Weekly Profitability Target
The primary performance objective is to develop a fully automated, adaptive XAUUSD high-frequency scalping Expert Advisor (EA) for MetaTrader 4 (MT4) capable of targeting 10% or more in weekly account returns while maintaining a low-to-medium risk profile.
The EA should seek to maximize consistent net profitability through intelligent trade selection, adaptive market analysis, efficient execution, and robust risk management.
The developer may use any suitable combination of algorithmic trading strategies, including neural networks, VWAP, Volume Spread Analysis, trend-following scalping, countertrend scalping, mean reversion, volatility breakouts, and other statistically validated high-frequency trading methodologies.
The EA should adapt its trading frequency, position sizing, entry criteria, and exit management to changing market conditions while prioritizing capital preservation and positive expectancy after spreads, commissions, and slippage.
The objective is to achieve weekly returns of 10% or more when market conditions support the strategy, without relying on martingale, uncontrolled grid trading, excessive leverage, or unsustainable recovery mechanisms.
15. Performance Validation Requirements
The developer must evaluate the EA against the following performance objectives:
-
Target weekly return: 10% or more.
-
Risk profile: Low to medium, with configurable risk controls.
-
Net profitability: Positive after spreads, commissions, and estimated slippage.
-
Profit factor: Demonstrably greater than 1.0, with a preference for stronger and more robust results.
-
Drawdown: Minimized through effective position sizing, stop-loss management, and account-level protection.
-
Market adaptability: Performance evaluated across trending, ranging, breakout, and high-volatility conditions.
-
Execution efficiency: Designed for short-duration trades targeting approximately 1–5 seconds or longer when appropriate.
-
Broker compatibility: Configurable spread filtering for XAUUSD, including a maximum setting equivalent to 40 pips.
-
Trading discipline: No forced trading to meet weekly profit targets when market conditions are unfavorable.
The programmer must provide credible backtesting evidence, out-of-sample validation, and demo forward-testing results where available. Performance claims must account for transaction costs and realistic execution assumptions.
The 10% or greater weekly return target is an ambitious performance objective, not a guaranteed outcome. The developer must explain the strategy's demonstrated performance and associated risks rather than promise a specific return without supporting evidence.
16. Updated Final Project Objective
I am seeking an experienced MQL4 programmer to develop a fully automated, adaptive, and risk-controlled XAUUSD high-frequency scalping EA for MetaTrader 4.
The EA should target weekly account returns of 10% or more, using a statistically defensible trading strategy that can adapt to changing market conditions and operate with minimal manual intervention.
The programmer has discretion over the strategy implementation, provided that the finished EA prioritizes positive net expectancy, efficient trade execution, controlled drawdown, and long-term robustness.
The EA must support short-duration scalping, configurable spread limits, automated risk management, and complete editable MQL4 source-code delivery.
Project budget: $110–$120 USD.
The strategy may incorporate neural networks, VWAP, Volume Spread Analysis, trend-following scalping, mean reversion, volatility breakouts, or other suitable algorithmic trading techniques.
Development priorities:
-
Positive expected net profitability after trading costs.
-
Controlled drawdown and account protection.
-
Reliable MT4 execution.
-
Compatibility with different XAUUSD brokers.
-
Adaptive responses to changing market conditions.
-
Short-duration trade execution.
-
Practical set-and-forget operation.
-
Complete, editable MQL4 source-code delivery.