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
(879)
Proyectos
1393
67%
Arbitraje
117
32% / 42%
Caducado
215
15%
Trabaja
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
488
17%
Libre
5
Desarrollador 5
Evaluación
(197)
Proyectos
320
35%
Arbitraje
64
13% / 56%
Caducado
83
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
(564)
Proyectos
779
46%
Arbitraje
23
39% / 13%
Caducado
63
8%
Trabaja
9
Desarrollador 9
Evaluación
(48)
Proyectos
80
28%
Arbitraje
8
75% / 13%
Caducado
41
51%
Libre
10
Desarrollador 10
Evaluación
(33)
Proyectos
35
40%
Arbitraje
11
9% / 91%
Caducado
4
11%
Libre
11
Desarrollador 11
Evaluación
(135)
Proyectos
193
42%
Arbitraje
17
29% / 59%
Caducado
28
15%
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
(491)
Proyectos
1017
58%
Arbitraje
29
28% / 24%
Caducado
132
13%
Libre
15
Desarrollador 15
Evaluación
(2442)
Proyectos
3079
66%
Arbitraje
77
48% / 14%
Caducado
340
11%
Trabaja
16
Desarrollador 16
Evaluación
(43)
Proyectos
72
49%
Arbitraje
4
0% / 50%
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
(564)
Proyectos
933
47%
Arbitraje
302
59% / 25%
Caducado
125
13%
Trabajando
19
Desarrollador 19
Evaluación
(66)
Proyectos
143
34%
Arbitraje
10
10% / 60%
Caducado
26
18%
Libre
20
Desarrollador 20
Evaluación
(1)
Proyectos
1
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre
Solicitudes similares
Hallo zusammen, es wird ein Entwickler für einen eigenen Expert Advisors gesucht. Der Expert Advisor soll anhand von zwei miteinander kombinierbaren Indikatoren (Relative Stärke inkl. Gleitender Durchschnitte und dem Supertrend-Indikator) Einstiegssignale in Long und Shortrichtung für alle möglichen Underlyings suchen. Hierbei soll bei einem initialen Einstieg zusätzlich in einem zeitlichen Abstand und gemäß
Hello, everyone. I have a supertend indicator. I want to set candle color according to trend like attached image. If you have done it, I will give you more jobs. Thanks
I want to create new bot by decode one other bot. This ea is very easy based on grip based trading. Real expert can contact me. My telegram number and what's up number are +919425904504
Hi! I am looking for an experienced developer who can create my own trading strategy for the XAUUSD instrument in the MT5 language. Main tasks: - trading strategy programming (opening with 2 solutions, closing with 1 solution); - provision of configuration options (allowing trading, trading time windows, SL, TP, trading strategy parameterization); - displaying a trading strategy graph on the chart (possibility of
I'm looking for an MQL5 expert to develop a trading EA that uses the ratio of candle wicks to body sizes to automatically enter and exit trades. Key features should include: - Autopilot function: The EA should handle trade entries without manual intervention. Trade exits are only by hitting trailing SL. - Trade criteria: Trades should only be placed based on specific, pre-defined ratios of candle wicks to body sizes
EA BREAKOUT SNR 30 - 100 USD
I need a developer who can work with quickly & details. Create EA MT5 with features :: 1. Can identify Support and Resistance (based on close candle) 2. Marking SNR Breakout Zone 3. There is a multitimeframe breakout scanner & History Setup Dashboard Panel 4. Scan the valid setup that appears (Compare 2 Timeframes) 5. There is manual marking of zone(box), SPREAD INFO & Next Bar Time, EXPIRED DATE & LOCK ACC 6
Double PSAR 30+ USD
Attachment has the latest requirements and picture. Some code isn't so good. Coders should code. I want solid code, not copied, not from EA Builder or similar tool. Please see written requirements and rules below. Please see picture attached. I hope these are clear. GBPUSD, H1, September 12-20, 2024 How closely can your coding match the picture? Indicators: PSAR Step: .01 Maximum: .01 Advanced PSAR Start AF: .02
Convert my tradingview pine script to mt4, Its a simple and straight code i need an expert programmer to convert my tradingview pine script to mt4, Thats All Thank you
The 1HSM EA allows users to configure trade settings, including activation, trading session, trade timing, maximum simultaneous trades, and stop loss type (virtual or visible). Users can set breakeven parameters, slippage control, and profit trailing options (gap, block, or target). Reverse trading can be enabled, allowing trades in the opposite direction if the price reverses significantly. Specific conditions for
Hello, i would like to have a fix on my plotted lines I use a liquidity strategy on the 1 hr time frame but the indicator that i am using for plotting the 1 hr lines is having a issue and printing the plot lines all over the place on the current 1 and 4 hr plot line as you can see in the screenshot this is very disturbing while i am trading can u fix that or just remove the current 1 hr plot line ?and or only show

Información sobre el proyecto

Presupuesto
50 - 150 USD
IVA (19%): 9.5 - 28.5 USD
Total: 59.5 - 178.5 USD
Para el ejecutor
45 - 135 USD