Expert Advisor that closes open positions on the chart if average profit in pips/points on all open positions is achieved

MQL4 Asesores Expertos Sripts

Tarea técnica

I am looking for an expert advisor that manages open positions on my MT4 platform (Broker Details: FXCM; 5 Digits account; 30:1 leverage; Instruments: FX & CFDs) that are manually openend.

Logic: If average profit from all open positions in FX-Pair/CFD-contract is more than X-amount in pips/points, then close x-% of all open positions

Example: 

1.    If the average profit from all open positions in EURUSD is:

a.    more than 10 pips/points, then close 33% of all open positions

b.    more than 20 pips/points, then close 33% of all open positions

c.    more than 30 pips/points, then close 33% of all open positions

2.    If there are for example 5 positions open at the moment the first profit target is reached, the EA should close 2 positions (so round up because it is not possible to close 1,66 (5*33%) positions). If the second profit target is reached (and there were no new positions created in the meantime) the EA should close 1 position ((5-2)*33% = 1)

3.    While the EA is running in the background, the programm always has to monitor the change in open positions. So in case new positions are manually openend or closed the EA has to recalculate its next operations.

a.    Example from above: If the Second profit target was reached and there were new positions entered in the meantime, the EA should start with the initial configuation, so that if the „new“ average profit from all open positions in EURUSD is:

                                       i.    more than 10 pips/points, then close 33% of all open positions

                                      ii.    more than 20 pips/points, then close 33% of all open positions

                                    iii.    more than 30 pips/points, then close 33% of all open positions

4.    The EA should either use the FIFO (First in First out) or LIFO (Last in First out) principle, when closing positions

5.    I would like to enter several closing instructions; i.e.:

a.    1) If the average profit then…

b.    2) If the average profit then…

c.    3) If the average profit…

d.   

ð  If there needs to be a limit, than I would prefer 3 different closing instructions

6.    Under some circumstances the EA also needs to be able to work with magic numbers, so that it only closes positions that were assigned a certain magic number (on/off function).


Han respondido

1
Desarrollador 1
Evaluación
(52)
Proyectos
133
44%
Arbitraje
14
50% / 29%
Caducado
55
41%
Libre
2
Desarrollador 2
Evaluación
(885)
Proyectos
1410
67%
Arbitraje
123
32% / 41%
Caducado
218
15%
Libre
Ha publicado: 1 ejemplo
3
Desarrollador 3
Evaluación
(84)
Proyectos
149
31%
Arbitraje
32
34% / 41%
Caducado
43
29%
Libre
4
Desarrollador 4
Evaluación
(1235)
Proyectos
2820
80%
Arbitraje
156
22% / 43%
Caducado
487
17%
Libre
5
Desarrollador 5
Evaluación
(206)
Proyectos
333
35%
Arbitraje
66
12% / 58%
Caducado
87
26%
Libre
6
Desarrollador 6
Evaluación
(221)
Proyectos
369
66%
Arbitraje
10
50% / 0%
Caducado
46
12%
Libre
7
Desarrollador 7
Evaluación
(33)
Proyectos
49
12%
Arbitraje
16
0% / 88%
Caducado
10
20%
Libre
8
Desarrollador 8
Evaluación
(638)
Proyectos
861
48%
Arbitraje
29
38% / 17%
Caducado
63
7%
Trabaja
9
Desarrollador 9
Evaluación
(55)
Proyectos
92
24%
Arbitraje
8
75% / 13%
Caducado
44
48%
Libre
10
Desarrollador 10
Evaluación
(33)
Proyectos
35
40%
Arbitraje
11
9% / 91%
Caducado
4
11%
Libre
Ha publicado: 4 ejemplos
11
Desarrollador 11
Evaluación
(136)
Proyectos
196
43%
Arbitraje
17
29% / 59%
Caducado
28
14%
Libre
12
Desarrollador 12
Evaluación
(59)
Proyectos
182
55%
Arbitraje
31
45% / 16%
Caducado
103
57%
Libre
13
Desarrollador 13
Evaluación
(195)
Proyectos
395
28%
Arbitraje
155
20% / 52%
Caducado
112
28%
Libre
14
Desarrollador 14
Evaluación
(493)
Proyectos
1022
58%
Arbitraje
30
27% / 23%
Caducado
133
13%
Trabaja
15
Desarrollador 15
Evaluación
(2661)
Proyectos
3382
68%
Arbitraje
77
48% / 14%
Caducado
342
10%
Libre
Ha publicado: 1 ejemplo
16
Desarrollador 16
Evaluación
(43)
Proyectos
74
50%
Arbitraje
5
0% / 60%
Caducado
19
26%
Libre
17
Desarrollador 17
Evaluación
(65)
Proyectos
87
39%
Arbitraje
3
0% / 33%
Caducado
29
33%
Libre
18
Desarrollador 18
Evaluación
(574)
Proyectos
945
47%
Arbitraje
309
58% / 27%
Caducado
125
13%
Libre
19
Desarrollador 19
Evaluación
(69)
Proyectos
146
34%
Arbitraje
13
8% / 62%
Caducado
26
18%
Libre
Ha publicado: 6 ejemplos
20
Desarrollador 20
Evaluación
(1)
Proyectos
1
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre
Solicitudes similares
Need to improve logic in existing coding for Range breakout/breakin EA 1) for timing range like 1am-10am Asian Range with max entry per session like London 1-2 times max entry 10-4pm & US session timings 1-2 entry 4pm - 8pm or 2) candle high low range eg 4pm to 4:30pm - entry logic eg mark 30min candle high low range as given in attached picture with buffer if required to show entry , SL & TP in trade/backtest mode
Make a Robot for mt5 using supertrend indicator for entry in trade with period 2 and multiplier 1.1 using Heiken Ashi candle also with martingle of 2 with maximum step for martingle is 15 step until profit reaches double of total loss. Select time frame 1 minute.Always close the previous trade if in loss then take next trade with martingle of 2 of previous lot in loss. All parameter have the option to change it
Robot que combine 2 indicadores en la ejecución automatica: 1 el Gann High Low y el Donchian Channel (DC) ACTIVO: XAU/USD EN UNA HORA PARA EL DC: período DC = 55 velas displacement/shift = 1 Mas Detalles en este video : https://youtu.be/3jI3cZY89T4?si=YEZAkMvWiq9O8-u9
Hello, I need an Expert Advisor for both MT4 and MT5 based on a recovery/grid trading strategy. Strategy Logic: User manually opens either a Buy or Sell market order. Once the first trade is opened, the EA automatically places an opposite pending order at a user-defined distance. If the pending order gets triggered, the EA places another opposite pending order at the original order price. This cycle continues
📌 Project Overview: I need a full Smart Trade Management System for MetaTrader 4/5. This is a complete trading ecosystem, not a simple EA. 📌 Core Features: Smart Money Management (risk-based lot calculation) Advanced Trading Toolbox (TradingView-style drawing tools) Central Master Dashboard (risk, filters, account control) Multi-account monitoring (MT4/MT5 synchronization) Real-time monitoring (spread, equity
We are seeking an experienced MQL5 developer to build the Guardian EA, a focused circuit-breaker module for MetaTrader 5. Objective Protect capital during adverse moves by temporarily exiting positions at a defined drawdown threshold, while virtually tracking those positions as open. Re-establish the positions only when market conditions stabilize (via ADX) and drawdown recovers to a lower threshold. The goal is full
Hi basically I'm wanting an already made EA scalper that's constantly in and out of trades on the M1 time frame that has good risk management. It knows what it's doing. Most of its trades are profitable and that can start with £100. I am willing to pay up to £1000 for the right scalping bot. If you please have one and you're very confident in it, please allow me to use a live version to see how it does and if I'm
hello good evening All professional programmers! I'd like to request a special services I need a Gold and Silver trading bot like the one in the video, one that works on real accounts. My only request is that I don't pay any money until the bot is built and tested. Thank you very much please contact me as soon as possible for more information
https://youtu.be/mUoczuxL0XE?si=2IzxX4jhML_-4f47&nbsp ; ...... “Secret London Session CRT Model - Insane Accuracy | ICT Secrets.” The model is called London Twilight and focuses on quick scalps near the end of London session. Source summary notes it uses CRT + Turtle Soup + PO3/AMD , mainly between 3:00 AM and 5:00 AM EST/New York time . ( Video Highlight | AI Video Summarizer ) Give your MQL5 coder these rules
I'm looking for a buy sell indicator that places signals at candle close doesn't repaint. Looking for strategy too as part of this project. Will want to see it before I create the contract. Please don't send me stuff you know isn't good. If done well will pay well and it can turn I to a long term collaboration

Información sobre el proyecto

Presupuesto
50 - 150 USD