Fix and optimize existing MT5 Expert Advisor.MQ5 source code

Specification

I have an existing MT5 Expert Advisor with the original MQ5 source code. I need an experienced MQL5 developer to review, debug and professionally improve the existing EA, not build an unrelated EA from scratch. The EA is mainly for XAUUSD and already contains entry signals, EMA filters, automatic lot sizing, basket profit management, spread/margin protection, news filtering and recovery logic. The main problem is the position management and recovery logic. Requirements: PROFIT FIRST: When an open trade/basket reaches a valid net-profit target, the EA should close and secure the profit instead of allowing a profitable position to return deeply into loss. HEDGE ONLY FOR EMERGENCY: Hedging must NOT be used during normal trading. The EA must not randomly open BUY and SELL positions against each other. Hedge/recovery should activate only when an existing position is genuinely trapped and predefined emergency conditions are met. SMART RECOVERY: Recovery must have a clear exit/unlock strategy. I do not want permanent BUY/SELL locking or uncontrolled opposite positions. The goal is controlled risk reduction and eventual basket exit. NO IMMEDIATE RE-ENTRY: If a position is manually closed, or the EA closes a basket, it must not immediately reopen the same trade. Add a proper cooldown/reset and require a fresh trading signal before re-entry. AUTOMATIC LOT SIZING: Position size should automatically adapt to account balance/equity and available margin. Small accounts must be protected from oversized positions. As the account grows, lot size may increase conservatively. RISK/EXPOSURE CONTROL: Before opening or adding positions, check free margin, margin level, current drawdown, total open lots and maximum account exposure. COMMISSION: My approximate trading commission is USD 11 per 1.00 lot round turn. Profit/basket calculations should consider estimated commission so the EA targets NET profit, not only gross floating profit. ROLLOVER PROTECTION: Stop new normal entries around 23:00 and resume around 01:15. Existing positions should be managed safely; do not simply close a losing position because the rollover period starts. NEWS/SPREAD PROTECTION: Prevent unsafe new entries during abnormal spread and important/high-impact news conditions where technically possible. Please inspect the complete existing MQ5 source code first and identify conflicts or bugs in the current entry, exit, hedge and recovery logic before modifying it. I need clean, maintainable MQ5 source code that compiles without errors, together with an explanation of the changes. The finished EA must be tested in MT5 Strategy Tester before delivery. Please do not promise guaranteed profits. My priority is robust position management, controlled risk, correct execution and predictable behavior.

Responded

1
Developer 1
Rating
(111)
Projects
184
25%
Arbitration
25
16% / 76%
Overdue
16
9%
Free
2
Developer 2
Rating
(64)
Projects
145
46%
Arbitration
21
38% / 24%
Overdue
32
22%
Free
3
Developer 3
Rating
(13)
Projects
20
40%
Arbitration
1
0% / 100%
Overdue
1
5%
Free
4
Developer 4
Rating
(22)
Projects
28
7%
Arbitration
9
33% / 33%
Overdue
1
4%
Working
5
Developer 5
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
6
Developer 6
Rating
(3)
Projects
4
0%
Arbitration
1
100% / 0%
Overdue
1
25%
Free
7
Developer 7
Rating
(34)
Projects
35
40%
Arbitration
0
Overdue
3
9%
Free
8
Developer 8
Rating
(185)
Projects
199
47%
Arbitration
4
50% / 25%
Overdue
1
1%
Working
9
Developer 9
Rating
(13)
Projects
23
39%
Arbitration
8
0% / 50%
Overdue
4
17%
Free
10
Developer 10
Rating
(6)
Projects
8
38%
Arbitration
2
50% / 50%
Overdue
2
25%
Free
11
Developer 11
Rating
(2)
Projects
2
0%
Arbitration
1
0% / 100%
Overdue
0
Free
12
Developer 12
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
13
Developer 13
Rating
(1)
Projects
1
0%
Arbitration
0
Overdue
1
100%
Free
14
Developer 14
Rating
(3)
Projects
1
0%
Arbitration
5
0% / 100%
Overdue
0
Free
15
Developer 15
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 1 code
16
Developer 16
Rating
(3)
Projects
9
67%
Arbitration
0
Overdue
0
Working
17
Developer 17
Rating
(21)
Projects
28
36%
Arbitration
7
14% / 71%
Overdue
2
7%
Free
18
Developer 18
Rating
(78)
Projects
105
55%
Arbitration
5
80% / 20%
Overdue
5
5%
Loaded
19
Developer 19
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 1 code
20
Developer 20
Rating
(634)
Projects
741
34%
Arbitration
49
53% / 39%
Overdue
14
2%
Working
21
Developer 21
Rating
(10)
Projects
12
33%
Arbitration
0
Overdue
2
17%
Working
Published: 1 code
22
Developer 22
Rating
(852)
Projects
1469
72%
Arbitration
123
28% / 47%
Overdue
360
25%
Working
Published: 3 articles
23
Developer 23
Rating
(1)
Projects
1
0%
Arbitration
0
Overdue
0
Free
24
Developer 24
Rating
(83)
Projects
98
33%
Arbitration
9
22% / 56%
Overdue
5
5%
Working
25
Developer 25
Rating
(369)
Projects
459
55%
Arbitration
24
58% / 17%
Overdue
31
7%
Working
26
Developer 26
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
27
Developer 27
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
28
Developer 28
Rating
(87)
Projects
121
68%
Arbitration
5
80% / 0%
Overdue
12
10%
Working
29
Developer 29
Rating
(2)
Projects
2
50%
Arbitration
0
Overdue
0
Free
30
Developer 30
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
31
Developer 31
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
32
Developer 32
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
33
Developer 33
Rating
Projects
1
0%
Arbitration
0
Overdue
0
Free
34
Developer 34
Rating
(13)
Projects
21
38%
Arbitration
0
Overdue
1
5%
Working
35
Developer 35
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
36
Developer 36
Rating
(33)
Projects
36
33%
Arbitration
5
0% / 80%
Overdue
0
Working
Published: 2 codes
37
Developer 37
Rating
(4)
Projects
4
100%
Arbitration
0
Overdue
0
Free
38
Developer 38
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
39
Developer 39
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
40
Developer 40
Rating
(1)
Projects
1
0%
Arbitration
3
0% / 100%
Overdue
1
100%
Free
41
Developer 41
Rating
(3)
Projects
3
67%
Arbitration
0
Overdue
0
Free
Published: 7 articles, 3 codes
42
Developer 42
Rating
(1)
Projects
1
0%
Arbitration
0
Overdue
0
Free
Published: 3 codes
43
Developer 43
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
44
Developer 44
Rating
(271)
Projects
553
50%
Arbitration
57
40% / 37%
Overdue
227
41%
Working
45
Developer 45
Rating
(7)
Projects
6
0%
Arbitration
4
25% / 75%
Overdue
2
33%
Free
46
Developer 46
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
47
Developer 47
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
48
Developer 48
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
49
Developer 49
Rating
(52)
Projects
58
59%
Arbitration
4
0% / 25%
Overdue
1
2%
Free
50
Developer 50
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
51
Developer 51
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
I’m looking for an experienced MQL5 developer to build a custom MT5 Expert Advisor for gold scalping, based on clearly defined support/resistance levels and false breakouts. Before development, I would welcome your technical feedback on the proposed rules, their feasibility, and any improvements you recommend. Please explain the reasoning behind your suggestions rather than promising returns. Proposed strategy: 1
Here is a professional, detailed requirements specification draft for your MQL5 freelance order based on your prompt: ​ Strategy Objective: Develop an automated Expert Advisor (EA) featuring a 1:3 Risk-to-Reward ratio optimized for a small starting budget. ​ Core Trading Logic: ​Execute automatic Buy and Sell trades using high-probability entry signals. ​Target a strict 90% theoretical win-rate structure through
i want to fix my gold martingale bot MT5. RSI 14 ENTRY 30 BUY 70 SELL Lot 0.02 0.04 0.07 TP 150 for all SL 90 30 30 once total daily profit is 200$ stop trading stop trading once 2 consecutives total losses stop trading if spread exceeded 30 and between hour 15 & 17 PM Move SL to breakeven point once the profit exceeded 50 from from breakeven thanks
MarketMind Breakout Pro XAUUSD H1 — Donchian Breakout EA Project type: Personal EA development and backtesting Platform: MetaTrader 5 Instrument: XAUUSD Timeframe: H1 Strategy: Donchian Channel breakout with EMA 200 Project overview This project evaluates a Donchian breakout trading strategy for XAUUSD on the H1 timeframe. The system uses channel-based breakout conditions and an EMA 200 trend filter. Historical
The purpose of this order is ONLY to test and implement my H1 POI (Point of Interest) identification logic correctly. I am not requesting the complete EA at this stage. I will provide the exact rules for identifying the H1 POI after selecting the developer. The developer must convert those rules into clear, deterministic MQL5 logic. Requirements: Analyze H1 candles according to the rules I provide. Identify and mark
Title: Fully Automatic MT5 Trading Bot (Expert Advisor) with Risk Management I want a fully automated trading robot (Expert Advisor) for MetaTrader 5, written in MQL5. The bot must automatically analyse market data, identify trading opportunities, execute BUY and SELL orders, manage open positions, and close trades according to predefined rules without requiring manual confirmation for each trade. Requirements
Hello, I’m looking for an experienced developer to research, build, test, and install a fully automated MetaTrader 5 trading bot for gold, XAUUSD. My total development and installation budget is $300, including all agreed work and fees. My goal is to pass a $100,000 FTMO US Two-Step Standard evaluation and sustainably maintain the funded account. I need a day-trading strategy that can buy in bullish markets and sell
I have three indicators that operate independently. I want to combine them into one indicator with custom expert programming that automatically enters trades when a signal is generated by one of the indicators. I will pay for this service Thanks you
Existing EA: NEW_CORE_ORB_M5_v021 | MT5 | XAUUSD M5 Early-stage research prototype, not a new EA from scratch. Need an experienced MQL5 developer to audit, complete, repair, improve and test BOTH independent strategies equally: Opening Range Breakout (ORB) and Scalp. Keep code lightweight and preserve an untouched baseline. No unnecessary rewrite or complex filters. 1. ORB Strategy Verify opening-range construction
Hello International Developer, I need LIFETIME MT5 EA for XAUUSD Gold. REQUIREMENTS: 1. Lifetime bot - No expiry date, unlimited accounts, unlimited installations 2. Must include source code .mq5 file - This makes it lifetime 3. Every trade MUST have Stop Loss 300 points and Take Profit 600 points 4. No martingale, No grid, No averaging - Clean safe strategy 5. Auto lot size = 1% risk per trade for good margin growth

Project information

Budget
30 - 50 USD