Spécifications

Freelance Task — EA Recovery Layer

Hello. I have a ready-made MQL5 EA. The signals, SL/TP and lot calculation should essentially not be touched. I need a recovery system added.

I am not a programmer — below is how the robot should behave.

What stays

Entry only from an EA signal. Stop-loss is not a new signal.

Trailing is already built into my EA — recovery does not implement its own trailing. If trailing is disabled, recovery must not work.

The normal lot remains whatever the EA already calculates (fixed or percentage of the account). Recovery only increases the next lot after a loss.

After a loss

Take the actual closing amount of the trade (profit, commission, swap, fee). This is the debt that needs to be recovered.

The next lot is calculated as follows: divide the debt by the entered number of parts, then add the minimum profit that the trailing normally protects on the normal lot (trailing start minus the distance to the price).

Based on this ratio, increase the lot relative to the normal EA lot.

Example: if the normal lot is 0.01 and the calculation gives approximately 0.04, use 0.04. The lot must be adjusted to the broker’s lot step.

The number of parts is only used to calculate the lot. It does not mean that there must be exactly that many trades.

There are limits: the maximum recovery lot and the maximum debt for which the formula is allowed to increase the lot. If the debt is larger, the lot does not increase further. Recovery is not disabled.

The increased lot is locked. Until the cycle ends, the lot does not decrease after profitable trades.

After a profit during recovery

Remove from the debt everything that this trade actually earned, not the “theoretical part”.

With every profitable recovery position, add another identical minimum trailing profit on the normal lot to the target.

The cycle ends when the recovery profits have covered the initial loss and this minimum profit for every profitable position. Then the normal lot is used again.

Examples. Loss = 5, minimum trailing profit on 0.01 = 0.50, locked lot = 0.04:

·       three times +2.5 → ends after the third;

·       +4 and +3 → ends after the second;

·       one +5.90 → ends immediately.

If there is another loss during the cycle, the debt increases, a new cycle starts, and a new lot is calculated.

Second option

Input: lock the lot during the cycle (default should be enabled) or recalculate the lot after a profit (then it can decrease).

Also: enable/disable recovery, number of parts for lot calculation, maximum lot, maximum debt for the formula, and whether a new loss starts the cycle again.

Panel on the chart

Add three rows to the existing EA panel:

·       Recovery status (disabled / waiting / cycle active and number of calculation steps);

·       Current debt;

·       Next lot.

Increase the background height so that the rows fit. Do not touch the other fields.

Restart

After an MT5 or VPS restart, the debt and locked lot must not be lost.

Do not use files. Store the state in Terminal Global Variables.

If they disappear or are invalid (different account, different magic, different symbol), restore the state after startup from this EA’s trade history.

In the Tester, every run starts from zero, without live cache.

After the work

It compiles. In the Tester: after a loss, the next signal uses a larger lot; after a profit, the lot remains unchanged; the cycle closes as in the examples; the panel shows the debt and next lot; after a terminal restart, the state rema.

Répondu

1
Développeur 1
Évaluation
(4)
Projets
7
57%
Arbitrage
1
100% / 0%
En retard
0
Gratuit
2
Développeur 2
Évaluation
(3)
Projets
9
67%
Arbitrage
0
En retard
0
Travail
3
Développeur 3
Évaluation
(9)
Projets
11
27%
Arbitrage
0
En retard
2
18%
Travail
Publié : 1 code
4
Développeur 4
Évaluation
(1)
Projets
1
0%
Arbitrage
0
En retard
0
Gratuit
Publié : 1 code
5
Développeur 5
Évaluation
(179)
Projets
193
46%
Arbitrage
4
50% / 25%
En retard
1
1%
Chargé
6
Développeur 6
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
7
Développeur 7
Évaluation
(261)
Projets
307
76%
Arbitrage
13
77% / 0%
En retard
5
2%
Travail
8
Développeur 8
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
9
Développeur 9
Évaluation
(83)
Projets
96
31%
Arbitrage
9
22% / 56%
En retard
5
5%
Travail
10
Développeur 10
Évaluation
(1)
Projets
1
0%
Arbitrage
0
En retard
0
Travail
11
Développeur 11
Évaluation
(21)
Projets
28
36%
Arbitrage
7
14% / 71%
En retard
2
7%
Gratuit
12
Développeur 12
Évaluation
(1)
Projets
1
0%
Arbitrage
0
En retard
0
Gratuit
13
Développeur 13
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
14
Développeur 14
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
15
Développeur 15
Évaluation
(59)
Projets
92
42%
Arbitrage
4
0% / 100%
En retard
3
3%
Travail
16
Développeur 16
Évaluation
(211)
Projets
274
21%
Arbitrage
24
54% / 17%
En retard
0
Gratuit
17
Développeur 17
Évaluation
Projets
1
0%
Arbitrage
0
En retard
0
Gratuit
Publié : 10 codes
18
Développeur 18
Évaluation
(1)
Projets
2
50%
Arbitrage
0
En retard
0
Gratuit
Publié : 2 codes
19
Développeur 19
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
20
Développeur 20
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
21
Développeur 21
Évaluation
Projets
1
0%
Arbitrage
0
En retard
0
Gratuit
22
Développeur 22
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Publié : 2 codes
23
Développeur 23
Évaluation
(64)
Projets
144
46%
Arbitrage
21
38% / 24%
En retard
32
22%
Gratuit
24
Développeur 24
Évaluation
(12)
Projets
14
29%
Arbitrage
0
En retard
0
Gratuit
25
Développeur 25
Évaluation
(16)
Projets
30
40%
Arbitrage
3
33% / 67%
En retard
7
23%
Travail
Commandes similaires
Hey guys, I’ve got an MT4 HFT EA that’s showing strong results on an IC Markets demo account, and I'm looking to move it over to MT5. Does anyone have a solid MT5 version that performs well on IC Markets? Having the source code (MQL5) included would be awesome. Thanks for any leads
Most of the expert is already coded . Create a panel to show the Ratio for the Range . Trigger is based on ratio . Show Distribution / project starts after we clear Distribution
I am looking for an experienced MQL5 developer who can BOTH research trading strategies and develop a commercial-quality MetaTrader 5 Expert Advisor. This is NOT simply a coding job. The developer is free to choose the trading logic, indicators, entry method, exit method, timeframe architecture and strategy type. I do not require the EA to copy or resemble any existing commercial EA. My priority is: ROBUST LONG-TERM
Project Description I am looking for an experienced MQL5/MT5 Expert Advisor developer to develop an automated trading EA for XAUUSD on the M3 timeframe , running on an Exness account . The EA will automate a manual strategy based on SNR/GAP zones , using two setup types: Price Rejection Price Correction The EA should identify valid BUY/SELL setups around predefined SNR/GAP areas, apply configurable RSI, SMA, EMA and
I need an MT5 Expert Advisor for XAUUSD (Gold) running on an Exness account. STRATEGY LOGIC The exact entry and exit rules will be provided in writing before development starts. Please quote for a single rule-based strategy with clearly separated logic, so the rules can be adjusted later without rewriting the whole EA. RISK MANAGEMENT (this is the priority of the project) - Risk per trade as a percentage of account
Hello Traders, Have a trading strategy or idea you want to automate? I specialize exclusively in MQL5 development, helping traders turn their concepts into professional trading solutions. Custom Expert Advisors — automate your strategy and reduce manual execution Custom Indicators — transform your market ideas into powerful trading tools Fix & Debug — identify errors and get your existing code working properly
I am looking for a Senior MQL5 Developer to create a new MetaTrader 5 Expert Advisor from scratch. I will provide a complete Requirements Specification containing objective entry, exit and risk-management rules. This is not a request to copy or decompile an existing product. Project requirements: Clean and modular MQL5 source code. Exact implementation of the supplied strategy. One signal evaluation per configured
Hi i need help to connect my chat gtp with ninja trader I have all tools. Just need supervision and seeking a professional who can do that for me. This the bridge extension https://crosstrade.io/blog/chatgpt-to-ninjatrader-mcp-walkthrough
MT4/MT5 HFT EA us30 30 - 3000 USD
Hello everybody, I'm looking for an experienced MQL4/MQL5 developer to optimize a High-Frequency Trading (HFT) Expert Advisor for both MT4 and MT5. The EA performs consistently and profitably on demo accounts, but when it is run on Raw and Standard live accounts under what appear to be the same trading conditions, it begins generating losses. I do not have the original source code (.mq4/.mq5); I only have the
looking for a highly experienced mql5 developer to build a professional trading ea based on multi timeframe top down analysis and market structure concepts the system should combine higher timeframe context with lower timeframe execution and provide both precise logic and clean visual representation on chart ⸻ core requirements • implementation of multi timeframe logic higher timeframe bias combined with lower

Informations sur le projet

Budget
30+ USD
TVA (23%): 6.9 USD
Total: 37 USD
Pour le développeur
27 USD
Délais
à 5 jour(s)

Client

Commandes passées5
Nombre d'arbitrages0