Update recovery logic EA

MQL5 Indikatoren Experten

Spezifikation

Hi Developers!


Looking for an experienced dev ( 50 jobs + on the platform ) to make an update on the recovery logic I currently have.


The logic as per now is not a classic recovery martingale, is computing the loss diving by 2 and computing automatically the lots needs to do it in order to make the recovery. ( You can have a look at in the attachments )

Now the logic is done at a daily level ( in case is touching the max entries or the trading day is finished the EA it stops trading ) the update needs to recover a loss in case there are some previous days losses.

Bellow you can find the logic of the actual recovery implementation

Some more details about the core of the EA

🔁 Where and how the recovery is implemented in the code

The recovery system is not in a single line. It is implemented through three components that work together:


1️⃣ Loss tracking – UpdateHistory()

👉 This is where the EA decides which trades were losses and stores their lot sizes

📍 Function:

void UpdateHistory(int idx, int jdx)

📍 Key code:

LotSizes[nTrades] = HistoryDealGetDouble(tk, DEAL_VOLUME); if (pro >= 0) IsLoss[nTrades] = false; else IsLoss[nTrades] = true; nTrades++;

What this does:

  • Reads account trade history

  • Filters only trades:

    • with the current Magic Number

    • after SeqStartTime[idx][jdx] (current sequence only)

  • For every closed trade (DEAL_ENTRY_OUT):

    • stores:

      • LotSizes[] → used volume

      • IsLoss[] → whether it was a loss

📌 Without UpdateHistory() there is no recovery, because GetLot() would have no data.


2️⃣ Recovery lot calculation – GetLot()

👉 THIS is the actual recovery engine

📍 Function:

double GetLot()


🔹 Recovery activation

v = LotSizes[CurIdx]; if (IsLoss[CurIdx]) { ... }

➡️ Recovery starts only if the last trade was a loss.


🔹 Core recovery formula

vv = v / nRecov * SL / TP;

Where:

  • v = lot size of the losing trade

  • nRecov =

    • 2 for the first recovery

    • 4 for chained recoveries

  • SL / TP = risk-to-reward compensation ratio

📌 This is NOT classic martingale
✔ Lot size does not double
✔ Lot grows proportionally to SL / TP


🔹 Recursive recovery (loss chains)

CurIdx++; if (CurIdx == nTrades) { return vv; } else { if (IsLoss[CurIdx]) { res = GetLot(); if (res > 0) break; } }

📌 Meaning:

  • For multiple consecutive losses:

    • the EA walks through the loss chain

    • calculates a controlled recovery volume

    • avoids explosive growth

👉 Recursive but capped recovery


🔹 Safety limits

if (AddInitLot) limit += LotSize; if (Vol > MaxLot) Vol = MaxLot; if (Vol > 0.0001 && Vol < 0.01) Vol = 0.01;

✔ Maximum lot cap
✔ Minimum volume enforcement
✔ Optional addition of initial lot


3️⃣ Applying recovery to real trades – OnTick()

👉 This is where recovery becomes an actual trade

📍 Key code:

Vol = GetLot(); cmnt = "r "; if (Vol < 0 || nTrades == 0) { cmnt = "i "; Vol = UpdatedLotSize(); SeqStartTime[i][k] = TimeCurrent() - 1; }

Decision logic:

Condition Action
GetLot() > 0 Recovery trade ( "r " )
GetLot() < 0 Initial trade
nTrades == 0 Initial trade
Profit achieved Sequence resets

Order comments:

  • "i " = initial

  • "r " = recovery


❌ What this recovery system does NOT do

❌ No forced trades
❌ No grid entries
❌ No lot doubling
❌ No guaranteed breakeven
❌ No recovery without a valid signal

✔ Recovery only affects position sizing, not entries


🧠 Final conclusion

  • Loss detection → UpdateHistory()

  • Recovery math → GetLot()

  • Execution decision → OnTick()

👉 Recovery is volume-based, signal-dependent, and risk-capped.


Bewerbungen

1
Entwickler 1
Bewertung
(15)
Projekte
19
16%
Schlichtung
5
40% / 40%
Frist nicht eingehalten
0
Frei
2
Entwickler 2
Bewertung
(17)
Projekte
21
10%
Schlichtung
5
40% / 40%
Frist nicht eingehalten
1
5%
Beschäftigt
3
Entwickler 3
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
4
Entwickler 4
Bewertung
(75)
Projekte
80
6%
Schlichtung
46
11% / 54%
Frist nicht eingehalten
7
9%
Arbeitet
5
Entwickler 5
Bewertung
(305)
Projekte
548
35%
Schlichtung
79
32% / 42%
Frist nicht eingehalten
197
36%
Beschäftigt
6
Entwickler 6
Bewertung
(4)
Projekte
3
33%
Schlichtung
2
0% / 100%
Frist nicht eingehalten
0
Frei
7
Entwickler 7
Bewertung
(9)
Projekte
13
38%
Schlichtung
0
Frist nicht eingehalten
3
23%
Frei
8
Entwickler 8
Bewertung
(3)
Projekte
1
100%
Schlichtung
3
0% / 100%
Frist nicht eingehalten
0
Frei
9
Entwickler 9
Bewertung
(144)
Projekte
186
41%
Schlichtung
24
58% / 21%
Frist nicht eingehalten
13
7%
Frei
10
Entwickler 10
Bewertung
(15)
Projekte
34
24%
Schlichtung
4
0% / 50%
Frist nicht eingehalten
2
6%
Arbeitet
11
Entwickler 11
Bewertung
(1)
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 2 Artikel
12
Entwickler 12
Bewertung
(2627)
Projekte
3337
67%
Schlichtung
77
48% / 14%
Frist nicht eingehalten
342
10%
Frei
Veröffentlicht: 1 Beispiel
13
Entwickler 13
Bewertung
(11)
Projekte
18
28%
Schlichtung
4
50% / 50%
Frist nicht eingehalten
1
6%
Frei
14
Entwickler 14
Bewertung
(6)
Projekte
7
29%
Schlichtung
0
Frist nicht eingehalten
1
14%
Beschäftigt
15
Entwickler 15
Bewertung
Projekte
0
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
0
Frei
16
Entwickler 16
Bewertung
(2)
Projekte
2
0%
Schlichtung
3
0% / 100%
Frist nicht eingehalten
1
50%
Frei
17
Entwickler 17
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
18
Entwickler 18
Bewertung
(8)
Projekte
8
13%
Schlichtung
0
Frist nicht eingehalten
0
Beschäftigt
19
Entwickler 19
Bewertung
(390)
Projekte
416
30%
Schlichtung
74
19% / 70%
Frist nicht eingehalten
52
13%
Arbeitet
20
Entwickler 20
Bewertung
(12)
Projekte
18
39%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
1
6%
Arbeitet
Ähnliche Aufträge
Existing EA 30 USD
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
Need to create an MT5 EA based on break out strategy. This will be all in one EA including daily breakout, hourly breakout, support and resistance breakout, pivot breakout, super trend break out, moving average breakout. Extra features include TP, SL, breakeven, notifications, dashboard
Forex Time: 7am to 10am (Can trade up until 11:45am)(enter around 10am) Indicator: prev day indicator by electrified Strategy is based off Wondafx profitable ftmo strategy. Search it up on Youtube before you apply. Currency Pairs: EURUSD AND GBPUSD Criteria for entry: Stop hunt, three levels of rise and fall, max 100 pip distance and three candle formation Time frame: 15 min Risk reward: 1:2 Max 1 trade a day Trade 1
Looking for an MT5 developer to build an automated trading bot that executes trades based on indicator signals. The bot should support flexible inputs, work across Forex, commodities, and crypto, and allow basic configuration options. If you're experienced with MT5 EAs and indicator integration, please reach out
Company is looking for a reliable trading strategy for long-term use. We are only interested in algorithmic systems with logical and transparent entry/exit reasoning. Critical Condition: The use of any form of Martingale , Grid , averaging , or " sitting out " losses is strictly prohibited. Every trade must be accompanied by a fixed or calculated Stop Loss. Requirements for the Proposal: 1. Delivery Format: Full
need an trading expert advisor with full source code for supporting any timeframe, based on multiple indicator and condition (can be imported or built in), Requirment- EA must protected by password or Account number or date-time limit indicator used- EMA, SUPER TREND, VWAP, ATR ( maybe add more) optimized for high number of trading at a time one or more trade (custom number or till limit) fast execution
🔹 Project Description I need a very simple MT4 (MQL4) Expert Advisor to be used on a DEMO account . Main Purpose: When enabled, the EA must prevent opening any NEW trades , while allowing existing open trades to be managed and closed normally . Required Behavior: Do NOT close any open trades. Do NOT modify TP or SL. Prevent opening of: New initial trades New trade cycles Existing trades must continue until they
We are looking to acquire an existing, profitable EA that trades using price action–based logic . The EA must operate as a day-trading system with proper Stop Loss and Take Profit , and must NOT use grid, martingale, or high-frequency scalping . This is a buyout request — we want to purchase the complete strategy along with the full source code . We are not looking to develop a new EA from scratch. Therefore, if you
I want a reliable and broker-independent copy-trading solution that copies trades from a master MT5 account to multiple MT4 and/or MT5 client accounts. The system is designed for stable live trading and works with any broker, handling common differences in symbols, pricing, and execution. The copier supports full trade synchronization, including trade opening, closing, partial closes, and SL/TP modifications, with
EA for mt4 30+ USD
I'm looking for an experience developer that can help develop an EA based Strategy below into EA itself no issues if used martingale & fix lot . Symbol: XAUUSD i will explain to the developer more datils before doing the EA. i will send the indicator and the set point. 1- indicator extreme 2- stochastic Oscillator can you add lots of features to your EA which will be so much useful such as 1- Trailing stop 2-Break

Projektdetails

Budget
30 - 80 USD