Termos de Referência
I am looking for an experienced MQL developer to create an Expert Advisor for MetaTrader 4 and MetaTrader 5 with identical functionality on both platforms.
The EA is a manual execution assistant with advanced risk management, ATR-based trailing stop logic, and partial close functionality for manually closing of a percent of the position.
The focus is on clean logic, stability, and correct trade management, not on indicators or strategy optimization.
1. Markets & Timeframe
-
Works for Forex and Crypto
-
Designed for the H4 (4-hour) timeframe
-
No scalping or high-frequency logic
2. Trade Execution
-
EA provides Buy and Sell buttons (inside the EA interface, not displayed on the chart)
-
When a button is pressed, the EA executes the trade automatically
-
Market orders only
3. Risk Management
The EA must support two risk modes:
-
Percentage Risk
-
Risk defined as % of account balance
-
-
Fixed Amount Risk
-
Risk defined as a fixed currency amount (EUR / USD, depending on account)
-
Lot size must be calculated automatically based on:
-
Risk setting
-
Entry price
-
Initial Stop Loss distance
4. Initial Stop Loss
The initial Stop Loss must support two methods:
-
ATR-based Stop Loss
-
Manual Stop Loss
-
User can enter an exact price level for the initial SL
-
. Trailing Stop Logic (R-Based)
-
Trailing Stop is ATR-based
-
The Stop Loss must trail price tick-by-tick from the moment the trade is opened
-
Stop Loss moves only in profit direction
-
Stop Loss must never move backwards
-
Trailing Stop logic is evaluated on every tick
Trailing Stop Adjustments:
-
From trade entry until +1R:
-
Trailing distance = 2 ATR Stop Loss distance
-
-
At +1R profit:
-
Trailing Stop distance is reduced to 1.5 × ATR
-
-
At +2R profit:
-
Trailing Stop distance is reduced to 1.0 × ATR
-
Direction logic:
-
BUY:
-
New SL = Bid − (ATR × active multiplier)
-
-
SELL:
-
New SL = Ask + (ATR × active multiplier)
-
6. Partial Close (Manual)
The EA must include manual partial close buttons:
-
Button to close 50% of the open position
-
Button to close 33% of the open position
-
Button to close 25% of the open position
Rules:
-
Works on the currently open position for the symbol
-
Lot rounding must be handled correctly
-
Must work on MT4 and MT5
7. Visuals
-
No indicators or values displayed on the chart
-
Buttons and controls must be part of the EA interface only
8. Magic Number
-
The EA must support an optional Magic Number
-
User can enable or disable Magic Number usage
9. Platform Compatibility
-
The EA must be delivered for MetaTrader 4 and MetaTrader 5
-
Functionality must be identical on both platforms
-
Shared logic is acceptable, but platform-specific implementations are expected
-
Clean, readable, and maintainable code is required
10. Deliverables
-
Fully working MT4 EA
-
Fully working MT5 EA
-
Source code
-
Short usage explanation (inputs & buttons)
11. Developer Requirements
-
Proven experience with MT4 and MT5
-
Experience with:
-
Risk-based position sizing
-
ATR calculations
-
Trailing stops
-
Partial closes
-
-
Clear communication in English
12. Testing
-
EA must compile without errors
-
No critical runtime errors
-
Logic must behave the same on MT4 and MT5