Add Money Menagment strategy to my EA

Job finished

Execution time 5 days

Specification

Good Morning, i have my personal EA that when the indicator find a trend change, close all the operations on that pair and open new one with new trend direction.

i'd like to implement that every time there is a negative position opened, EA doesn't close that position but opens new one on the opposite direction with double lots and close both positions when the sum is 0.

in this moment EA works like this:

  • when indicator find a signal, EA opens 2 operations with same lots, the first one close at tp1, the second one at tp2.
  • If operations hit tp1 but not the tp2, a trailing SL close the second operations in profit.
  • If operations can't reach tp1, EA closes both only when indicator find a trend change (that's what i'd like to change).


EA has to work as it has done so far except for the third point i wrote. the only thing that has to be changed is that WHEN POSITIONS ARE NEGATIVE AND THEY DIDN'T REACH TP1, EA has to open the next operation with doubles lots and close both operations when the sum is 0. if also the second operation will go in negative and indicator find another trend change, EA has to open a third operations with doubles lots of the second one and close ALL three operations (that being two for each trend change, there are 6 operations in all) when the sum is 0.


Thank you all.

Responded

1
Developer 1
Rating
(390)
Projects
416
30%
Arbitration
74
19% / 72%
Overdue
52
13%
Working
2
Developer 2
Rating
(93)
Projects
133
35%
Arbitration
13
38% / 31%
Overdue
32
24%
Free
3
Developer 3
Rating
(217)
Projects
369
33%
Arbitration
34
41% / 29%
Overdue
108
29%
Free
Published: 1 code
4
Developer 4
Rating
(115)
Projects
129
18%
Arbitration
11
27% / 55%
Overdue
4
3%
Free
5
Developer 5
Rating
(40)
Projects
58
22%
Arbitration
10
10% / 70%
Overdue
13
22%
Free
Similar orders
Hi, Require a modification and optimization of an existing EA for XAU. 1. confirmation and modification of the high impact US news algo. 2.confirmation of the correct time for news. EA set time to Malaysia +8 GMT 3.Redesign HUD panel with new look hi-tech professional interactive panel 4.to add EA to work with approved Broker trading acct nbr for control of EA usage
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
please share: Strategy description — entry/exit rules, indicators used, timeframe(s), and instrument(s) (a written explanation, screenshots, or an existing indicator/EA to reference all work) Risk management rules — position sizing method (fixed lot / % risk), stop loss / take profit logic, max drawdown or daily loss limits, and whether martingale/grid/hedging is involved Broker & account details — broker name
I need a unique grid trading system for XAUUSD that combines entry, controlled two-sided grid expansion, DCA (Dollar Cost Averaging) basket profit control, hedging. Unlike traditional grid EAs that only trade against price, this unique grid system should dynamically build positions in both directions based on market movement, allowing flexible adaptation to changing conditions ie the grid needs to dynamically move
I need an experienced MQL5 developer to create a fully automated MT5 Expert Advisor called Ayoub Gold EA , focused exclusively on XAUUSD (Gold) . Main requirements: Platform: MT5 / MQL5. Fully automated BUY and SELL trading on XAUUSD. Must support broker suffixes such as XAUUSD, XAUUSD.f and XAUUSDm. Trading strategy based mainly on Range Breakout with trend confirmation. EMA, ADX and ATR filters. London/New York
Looking for an experienced Sierra Chart ACSIL/C++ developer to customize an existing footprint chart. I need 3 things: 7-Day ATR – calculate and display a configurable 7-day ATR. Custom Footprint – modify my existing footprint chart to match my preferred layout/data display. Automatic LVN – detect and plot Low Volume Nodes automatically based on volume distribution. I already have a working footprint chart, so no
//———————————————————————————————————————————————————————————————————— struct S_MCAV { double matureSum; double totalSum; double value; void Init () { matureSum = 0.0; totalSum = 0.0; value = 0.5; } void AddContext (int ctx) { totalSum += 1.0; if (ctx == 1) matureSum += 1.0; } void ApplyDecay (double rate) { matureSum *= rate; totalSum *= rate; } void Update () {
1. Title Development of a Custom MQL5 Expert Advisor for XAUUSD (MetaTrader 5) 2. Requirements Specification Overview: I am looking for an experienced MQL5 developer to build a robust, fully custom Expert Advisor (EA) for MetaTrader 5 tailored for trading Gold (XAUUSD). Core Specifications & Features: Asset & Timeframe: Designed specifically for XAUUSD. Timeframe should be selectable directly from the EA inputs
Cerco uno sviluppatore MQL5 esperto per sviluppare da zero un Expert Advisor completamente nuovo per XAUUSD su MT5. Non desidero un semplice Expert Advisor basato su indicatori fissi. Desidero un sistema di trading dinamico e adattivo, in grado di adattare il proprio comportamento alle mutevoli condizioni di mercato di XAUUSD. Lo sviluppatore dovrebbe essere libero di combinare qualsiasi tecnica ritenuta opportuna
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

Project information

Budget
30+ USD
Deadline
from 1 to 2 day(s)