Add Cumulative Drawdown From Peak Protection to Existing MT5 EA

Tarea técnica

Hello,

I have an existing MT5 Expert Advisor for XAUUSD. I need one specific protection feature added only.

Task:
Add a modular ON/OFF “Cumulative Drawdown From Peak” protection to my current EA.

Important:
Do not change the trading strategy.
Do not change entry logic.
Do not change exit logic.
Do not change EMA, ADX, session filter, Sell Hour Filter, lot sizing, SL/TP, BreakEven, or Trailing settings.
This job is only for adding the cumulative drawdown protection.

Required Inputs:

  1. UseCumulativeDDProtection = true/false

  2. CumulativeDD_MaxPercent = configurable percentage

  3. CumulativeDD_Action = stop new entries only / close all bot positions and stop

  4. ResetPeakMode = never reset / daily reset / manual reset if possible

Required Logic:

  1. Track the highest account equity peak since the EA started or since reset.

  2. Calculate current drawdown from that peak.

  3. If drawdown from peak reaches the configured limit, the EA must block new trades.

  4. Optional setting: close all bot-managed positions when the limit is reached.

  5. The protection must affect only this EA’s trades if possible, using Magic Number.

  6. The protection must be safe after MT5 restart. If possible, store/recover the equity peak using Global Variables or another reliable method.

Required Logs:
The EA must print clear logs such as:

  • CUM_DD_PEAK_UPDATED

  • CUM_DD_CURRENT

  • CUM_DD_LIMIT_HIT

  • CUM_DD_NEW_ENTRIES_BLOCKED

  • CUM_DD_POSITIONS_CLOSED

Deliverables:

  1. Updated MQ5 file with a new version name:
    EA_Trend_Advanced_v2_70_CumulativeDD_TEST.mq5

  2. Updated MQH file only if necessary.

  3. No unnecessary code rewrite.

  4. A short explanation of every block of code changed.

  5. Screenshot or confirmation that the EA compiles with 0 errors and 0 warnings.

  6. The original v2.69 logic must remain unchanged except for this new protection feature.

I will provide the current EA files after accepting the developer.


Han respondido

1
Desarrollador 1
Evaluación
(62)
Proyectos
90
29%
Arbitraje
24
13% / 58%
Caducado
7
8%
Trabaja
2
Desarrollador 2
Evaluación
(107)
Proyectos
175
25%
Arbitraje
23
13% / 78%
Caducado
16
9%
Libre
3
Desarrollador 3
Evaluación
(12)
Proyectos
18
17%
Arbitraje
3
33% / 67%
Caducado
3
17%
Libre
4
Desarrollador 4
Evaluación
(158)
Proyectos
201
60%
Arbitraje
10
80% / 0%
Caducado
0
Libre
Ha publicado: 1 ejemplo
5
Desarrollador 5
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Trabaja
6
Desarrollador 6
Evaluación
(8)
Proyectos
8
0%
Arbitraje
2
50% / 0%
Caducado
1
13%
Trabaja
7
Desarrollador 7
Evaluación
(317)
Proyectos
564
35%
Arbitraje
81
31% / 44%
Caducado
204
36%
Libre
8
Desarrollador 8
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
9
Desarrollador 9
Evaluación
(166)
Proyectos
176
45%
Arbitraje
3
33% / 33%
Caducado
1
1%
Trabaja
10
Desarrollador 10
Evaluación
(33)
Proyectos
36
33%
Arbitraje
5
0% / 80%
Caducado
0
Trabaja
Ha publicado: 2 ejemplos
11
Desarrollador 11
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
12
Desarrollador 12
Evaluación
(244)
Proyectos
288
76%
Arbitraje
13
77% / 0%
Caducado
4
1%
Libre
13
Desarrollador 13
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
14
Desarrollador 14
Evaluación
(26)
Proyectos
32
34%
Arbitraje
0
Caducado
2
6%
Libre
15
Desarrollador 15
Evaluación
(89)
Proyectos
253
78%
Arbitraje
9
22% / 56%
Caducado
36
14%
Trabaja
Ha publicado: 3 artículos, 26 ejemplos
16
Desarrollador 16
Evaluación
(12)
Proyectos
16
25%
Arbitraje
1
0% / 0%
Caducado
4
25%
Trabaja
17
Desarrollador 17
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
18
Desarrollador 18
Evaluación
(11)
Proyectos
20
40%
Arbitraje
8
0% / 50%
Caducado
3
15%
Trabaja
19
Desarrollador 19
Evaluación
(17)
Proyectos
21
14%
Arbitraje
8
38% / 38%
Caducado
3
14%
Trabajando
20
Desarrollador 20
Evaluación
(47)
Proyectos
59
59%
Arbitraje
4
75% / 25%
Caducado
1
2%
Trabajando
21
Desarrollador 21
Evaluación
(14)
Proyectos
20
25%
Arbitraje
0
Caducado
2
10%
Libre
Ha publicado: 3 ejemplos
22
Desarrollador 22
Evaluación
(2)
Proyectos
4
50%
Arbitraje
0
Caducado
0
Trabaja
23
Desarrollador 23
Evaluación
(48)
Proyectos
57
35%
Arbitraje
15
27% / 60%
Caducado
1
2%
Libre
24
Desarrollador 24
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
25
Desarrollador 25
Evaluación
(169)
Proyectos
202
48%
Arbitraje
5
20% / 60%
Caducado
2
1%
Libre
26
Desarrollador 26
Evaluación
(22)
Proyectos
29
45%
Arbitraje
4
50% / 50%
Caducado
1
3%
Trabajando
27
Desarrollador 27
Evaluación
(279)
Proyectos
377
72%
Arbitraje
19
32% / 47%
Caducado
15
4%
Libre
Ha publicado: 15 ejemplos
28
Desarrollador 28
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
29
Desarrollador 29
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
I require a custom EA and an accompanying custom indicator built in MQL5 for Meta Trader 4/5. The EA must be fully automated (Algo Trading); Telegram-Signal-Linked and named 'AMK Fx'
Use the H4 timeframe to determine the main trend direction. Identify valid order blocks on the H1 timeframe. Identify liquidity zones and liquidity sweeps. Wait for M15 confirmation before opening a trade. Only take buy trades in bullish market conditions and sell trades in bearish market conditions. Risk a fixed percentage of account balance per trade (user adjustable). Automatically calculate lot size based on
MC Trader's 30+ USD
If Buy: it must Buy when a conformation is done Bye the candle that would be a bullish engolfing candle or after liqudity swip or when sellers has stepped down the market and the market regains energy and trand upwards, it's stop loss must be below the Buy position and it's take profit must be at the top of all candles
Hello, I'm looking for an expert who can help me acquire a secure, easy-to-use bot with Turkish language support for automated buying and selling in Forex, commodities, and cryptocurrencies, and who can also teach me how to set it up and use it
I need a new strategy with and edge for BTCUSD, optionally build an simple expert advisor for backtesting demonstration , i can build it myself if necessary, i only look for an effective strategy with an edge. Thanks
Title Professional AI Automation Trading Bot for Forex & Crypto Solution Language Python (preferred) or MQL5 depending on integration requirements. Categories Expert Advisor (EA) for MetaTrader 5 Automated trading strategies AI/ML-based signal generation Risk management automation Required Skills Strong knowledge of MQL5/Python Experience with MetaTrader API integration Machine learning model deployment
Description: I am looking for an experienced MQL5 developer to build a fully automated Expert Advisor (EA) for MT5 tailored for Prop Firm challenges and funded accounts. I need a robust, plug-and-play solution with rigorous risk controls. Key Requirements: Platform: MT5 Trading Logic: I am looking for a reliable strategy based either on a Breakout Strategy (e.g., London session breakout) or a Mean Reversion Strategy
The striker robot 30 - 2000 USD
I would like a trend and pullback strategy for the robot timeframe:15 minutes(m15) or 1 hour(h1) indicators:50 EMA (Exponential Moving Average)/200 EMA/RSI (14) BUY SET UP 1.Confirm The Trend .50 EMA must be above 200 EMA .Price must be above both EMAs 2.Wait for a pullback .Do not buy when the price shoots up. .Wait for the price to come back near the 50 EMA 3.Confirm entry .ENTER BUY WHEN: .A bullish candlestick
### ** Main EA File** - `InstitutionalTrendPullbackScalper.mq5` **Core Features Implemented:** **Multi-Timeframe Analysis** - M15 trend filter (EMA20 > EMA50 for uptrends) - M5 entry signals with 5-condition confirmation - Independent indicator sets for both symbols **Advanced Entry Logic** - RSI reversal detection (crosses thresholds) - Price pullback zone validation - Bullish/bearish candle close confirmation -
I need an Ai trading bot for Binance and BTC on MT5 that also uses order flow data. It should also make use of TSI- Temporal indicator sampling and also it should make use of fundamental analysis in the process of signal generation

Información sobre el proyecto

Presupuesto
30+ USD
Plazo límite de ejecución
de 1 a 2 día(s)

Cliente

Encargos realizados1
Número de arbitrajes0