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

MQL4 Experts Scripts

Specification

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


Responded

1
Developer 1
Rating
(52)
Projects
133
44%
Arbitration
14
50% / 29%
Overdue
55
41%
Free
2
Developer 2
Rating
(885)
Projects
1410
67%
Arbitration
123
32% / 41%
Overdue
218
15%
Free
Published: 1 code
3
Developer 3
Rating
(84)
Projects
149
31%
Arbitration
32
34% / 41%
Overdue
43
29%
Free
4
Developer 4
Rating
(1235)
Projects
2820
80%
Arbitration
156
22% / 43%
Overdue
487
17%
Free
5
Developer 5
Rating
(206)
Projects
333
35%
Arbitration
66
12% / 58%
Overdue
87
26%
Free
6
Developer 6
Rating
(221)
Projects
369
66%
Arbitration
10
50% / 0%
Overdue
46
12%
Free
7
Developer 7
Rating
(33)
Projects
49
12%
Arbitration
16
0% / 88%
Overdue
10
20%
Free
8
Developer 8
Rating
(642)
Projects
867
48%
Arbitration
29
38% / 17%
Overdue
63
7%
Working
9
Developer 9
Rating
(55)
Projects
92
24%
Arbitration
8
75% / 13%
Overdue
44
48%
Free
10
Developer 10
Rating
(33)
Projects
35
40%
Arbitration
11
9% / 91%
Overdue
4
11%
Free
Published: 4 codes
11
Developer 11
Rating
(136)
Projects
196
43%
Arbitration
17
29% / 59%
Overdue
28
14%
Free
12
Developer 12
Rating
(59)
Projects
182
55%
Arbitration
31
45% / 16%
Overdue
103
57%
Free
13
Developer 13
Rating
(195)
Projects
395
28%
Arbitration
155
20% / 52%
Overdue
112
28%
Free
14
Developer 14
Rating
(493)
Projects
1022
58%
Arbitration
30
27% / 23%
Overdue
133
13%
Working
15
Developer 15
Rating
(2670)
Projects
3403
68%
Arbitration
77
48% / 14%
Overdue
342
10%
Free
Published: 1 code
16
Developer 16
Rating
(43)
Projects
74
50%
Arbitration
5
0% / 60%
Overdue
19
26%
Free
17
Developer 17
Rating
(65)
Projects
87
39%
Arbitration
3
0% / 33%
Overdue
29
33%
Free
18
Developer 18
Rating
(574)
Projects
945
47%
Arbitration
309
58% / 27%
Overdue
125
13%
Free
19
Developer 19
Rating
(69)
Projects
146
34%
Arbitration
13
8% / 62%
Overdue
26
18%
Free
Published: 6 codes
20
Developer 20
Rating
(1)
Projects
1
0%
Arbitration
1
0% / 100%
Overdue
0
Free
Similar orders
🔍 Strategy Logic 📌 Indicators Used 21 EMA RSI (Upper Level: 61, Lower Level: 39 – Customizable) 📈 Buy Side Setup (Long Entry) Step 1 – Trend Confirmation A Green candle must close above 21 EMA. Step 2 – Pattern Formation After the green candle, observe next 4 candles. At least one Red candle must form (opposite candle). That Red candle must also close above EMA. Step 3 – Key Level Marking Mark the High of the Red
Dear Developer, I am looking to hire an experienced Meta Trader4 and 5 (MQL5) Expert Advisor developer to build a custom Expert Advisor for XAUUSD (Gold). This project is based on a structured swing trading system using market structure analysis and multi-timeframe confirmation. PROJECT OVERVIEW The Expert Advisor must be designed to trade XAUUSD using the following multi-timeframe approach: • Daily (D1): Optional
Requirements Specification: Custom Trading Robot (Expert Advisor) I am looking for a qualified developer to design and build a fully automated trading robot (Expert Advisor). The system should be reliable, beginner-friendly, and capable of running with minimal manual input once installed. 1. General Purpose The robot should automatically analyze the market and execute trades. It must work on MetaTrader 4 or
Hi, I need a professional MetaTrader 5 Expert Advisor (Pure MQL5, no Python) with a built-in GUI panel and ultra-fast OnTick execution. The strategy is based only on the last two digits after the decimal point and must work in real time with high accuracy. ### Main Requirements * Pure MQL5 Expert Advisor. * Real-time OnTick processing. * Support XAUUSD and any MT5 symbol. * No fixed price levels; price must be
I am looking for an experienced MQL5 developer to build a robust, high performance Expert advisor (EA) designed specifically for passing and managing funded accounts.The primary focus is to make some good money and also focus on risk management, consistent equity growth
Expert Advisor (EA) Requirements – MT5 (MQL5) Project Overview Develop an automated Expert Advisor (EA) for MetaTrader 5 based on EMA crossover signals combined with strict risk management and trade management principles. The EA must be optimized for Forex pairs and indices and should operate automatically without manual intervention. Entry Conditions Buy Setup Fast EMA crosses above Slow EMA. Current candle closes
I am in need of a profitable scalping EA for gold. No grid or martingale strategy pls. If you have one fully developed and working, pls reach out. You should be able to provide trial version
Simple MT5 indicator showing Friday close to Monday open gap on chart. Features: · Draw horizontal line at Friday close · Label showing gap size in pips · Toggle on/off
Hi. I have the statement of the Ea live results that I want to have. Please check this video from YouTube and the statement to see how the robot is working every day. I want a robot like this or better. The robot has 1-4% drawdown and 300-500% profit per month The robot works with ICMarkets Global 1:500 leverage and FPMarkets. The robot works between 10-30 minutes London session. Also the Robot can start trading from
MT5 Expert Advisor Development Project Overview I am looking for an experienced MQL5 developer to build a custom MetaTrader 5 Expert Advisor based on a grid-cycle trading framework. This is not a standard grid EA . The system combines: Session-based trade initiation Multi-filter signal generation Dynamic grid management Advanced basket management State-machine-driven trade lifecycle management Dynamic take-profit

Project information

Budget
50 - 150 USD