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

MQL4 Experts Scripts

Spécifications

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).


Répondu

1
Développeur 1
Évaluation
(52)
Projets
133
44%
Arbitrage
14
50% / 29%
En retard
55
41%
Gratuit
2
Développeur 2
Évaluation
(879)
Projets
1392
67%
Arbitrage
117
32% / 42%
En retard
215
15%
Gratuit
3
Développeur 3
Évaluation
(84)
Projets
149
31%
Arbitrage
32
34% / 41%
En retard
43
29%
Gratuit
4
Développeur 4
Évaluation
(1235)
Projets
2820
80%
Arbitrage
156
22% / 43%
En retard
488
17%
Gratuit
5
Développeur 5
Évaluation
(196)
Projets
318
35%
Arbitrage
64
13% / 56%
En retard
82
26%
Gratuit
6
Développeur 6
Évaluation
(221)
Projets
369
66%
Arbitrage
10
50% / 0%
En retard
46
12%
Gratuit
7
Développeur 7
Évaluation
(33)
Projets
49
12%
Arbitrage
16
0% / 88%
En retard
10
20%
Gratuit
8
Développeur 8
Évaluation
(559)
Projets
770
46%
Arbitrage
23
39% / 13%
En retard
63
8%
Travail
9
Développeur 9
Évaluation
(48)
Projets
80
28%
Arbitrage
8
75% / 13%
En retard
41
51%
Gratuit
10
Développeur 10
Évaluation
(33)
Projets
35
40%
Arbitrage
11
9% / 91%
En retard
4
11%
Gratuit
11
Développeur 11
Évaluation
(135)
Projets
193
42%
Arbitrage
17
29% / 59%
En retard
28
15%
Gratuit
12
Développeur 12
Évaluation
(59)
Projets
182
55%
Arbitrage
31
45% / 16%
En retard
103
57%
Gratuit
13
Développeur 13
Évaluation
(195)
Projets
395
28%
Arbitrage
155
20% / 52%
En retard
112
28%
Gratuit
14
Développeur 14
Évaluation
(491)
Projets
1017
58%
Arbitrage
29
28% / 24%
En retard
132
13%
Gratuit
15
Développeur 15
Évaluation
(2434)
Projets
3065
66%
Arbitrage
77
48% / 14%
En retard
340
11%
Travail
16
Développeur 16
Évaluation
(43)
Projets
72
49%
Arbitrage
4
0% / 50%
En retard
19
26%
Gratuit
17
Développeur 17
Évaluation
(65)
Projets
87
39%
Arbitrage
3
0% / 33%
En retard
29
33%
Gratuit
18
Développeur 18
Évaluation
(563)
Projets
932
47%
Arbitrage
302
59% / 25%
En retard
124
13%
Occupé
19
Développeur 19
Évaluation
(66)
Projets
143
34%
Arbitrage
10
10% / 60%
En retard
26
18%
Gratuit
20
Développeur 20
Évaluation
(1)
Projets
1
0%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
Commandes similaires
Hi, I have a Compiled JForex strategy (.jfx file) I would like someone to convert it in to readable source code. Please let me know if you can do this task. Thank you
I want to make something automatic which EMA will automatically trade in my account. For this I want to make a simple robot I want to get this made automatically on a simple EMA
I need a professional who have the full knowledge in Ctrader and I want to add new idea for my ctrader https://ctrader.com/algos/indicators/show/3444/ Let me know if this is what you can do and the price to get it done. Thanks
I am looking for a skilled Thinkorswim script developer for a one-time project. Your task will be to combine 8 distinct Thinkorswim studies (I will provide the code for each) into one Lower Study. The final script should display histogram rows for the individual studies with a bubble color scheme of bright green, dark green, gray, dark red, and bright red
I need some who can develop my strategy and hand me over the source code... I will give you the specific area in the market i want to mark out and then set pending orders to execute once price move into the zone

Informations sur le projet

Budget
50 - 150 USD
TVA (19%): 9.5 - 28.5 USD
Total: 59.5 - 178.5 USD
Pour le développeur
45 - 135 USD