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

MQL4 전문가 스크립트

명시

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


응답함

1
개발자 1
등급
(52)
프로젝트
133
44%
중재
14
50% / 29%
기한 초과
55
41%
무료
2
개발자 2
등급
(879)
프로젝트
1392
67%
중재
117
32% / 42%
기한 초과
215
15%
무료
3
개발자 3
등급
(84)
프로젝트
149
31%
중재
32
34% / 41%
기한 초과
43
29%
무료
4
개발자 4
등급
(1235)
프로젝트
2820
80%
중재
156
22% / 43%
기한 초과
488
17%
무료
5
개발자 5
등급
(196)
프로젝트
318
35%
중재
64
13% / 56%
기한 초과
82
26%
무료
6
개발자 6
등급
(221)
프로젝트
369
66%
중재
10
50% / 0%
기한 초과
46
12%
무료
7
개발자 7
등급
(33)
프로젝트
49
12%
중재
16
0% / 88%
기한 초과
10
20%
무료
8
개발자 8
등급
(559)
프로젝트
770
46%
중재
23
39% / 13%
기한 초과
63
8%
작업중
9
개발자 9
등급
(48)
프로젝트
80
28%
중재
8
75% / 13%
기한 초과
41
51%
무료
10
개발자 10
등급
(33)
프로젝트
35
40%
중재
11
9% / 91%
기한 초과
4
11%
무료
11
개발자 11
등급
(135)
프로젝트
193
42%
중재
17
29% / 59%
기한 초과
28
15%
무료
12
개발자 12
등급
(59)
프로젝트
182
55%
중재
31
45% / 16%
기한 초과
103
57%
무료
13
개발자 13
등급
(195)
프로젝트
395
28%
중재
155
20% / 52%
기한 초과
112
28%
무료
14
개발자 14
등급
(491)
프로젝트
1017
58%
중재
29
28% / 24%
기한 초과
132
13%
무료
15
개발자 15
등급
(2434)
프로젝트
3065
66%
중재
77
48% / 14%
기한 초과
340
11%
작업중
16
개발자 16
등급
(43)
프로젝트
72
49%
중재
4
0% / 50%
기한 초과
19
26%
무료
17
개발자 17
등급
(65)
프로젝트
87
39%
중재
3
0% / 33%
기한 초과
29
33%
무료
18
개발자 18
등급
(563)
프로젝트
932
47%
중재
302
59% / 25%
기한 초과
124
13%
바쁜
19
개발자 19
등급
(66)
프로젝트
143
34%
중재
10
10% / 60%
기한 초과
26
18%
무료
20
개발자 20
등급
(1)
프로젝트
1
0%
중재
1
0% / 100%
기한 초과
0
무료
비슷한 주문
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

프로젝트 정보

예산
50 - 150 USD
VAT (19%): 9.5 - 28.5 USD
총: 59.5 - 178.5 USD
개발자에게
45 - 135 USD