Auto close trade based on position count

MQL5 Experts

Job finished

Execution time 3 days
Feedback from customer
Very good developer! Highly recommended.
Feedback from employee
Very good customer, I will glad to work with you again.

Specification

Hi,

I need an EA to do below work.


When a new position is open, check if there are more than 1 active positions in same direction.

If there are, close positions in that direction until only 1 left.

The EA should have a setting to choose which position should be left in above step.

Setting option 1) close trades by create time, leave the latest

Setting option 2) close trades by create time, leave the earliest

Setting option 3) close trades by profit/loss, leave the one with max profit

Setting option 4) close trades by profit/loss, leave the one with max loss


Check position's direction only, do not consider symbol type.

Responded

1
Developer 1
Rating
(174)
Projects
232
45%
Arbitration
17
82% / 12%
Overdue
35
15%
Working
2
Developer 2
Rating
(57)
Projects
75
25%
Arbitration
9
33% / 56%
Overdue
8
11%
Free
3
Developer 3
Rating
(374)
Projects
397
31%
Arbitration
61
20% / 69%
Overdue
49
12%
Working
4
Developer 4
Rating
(878)
Projects
1391
67%
Arbitration
117
32% / 42%
Overdue
215
15%
Free
5
Developer 5
Rating
(74)
Projects
73
47%
Arbitration
2
50% / 50%
Overdue
2
3%
Free
6
Developer 6
Rating
(40)
Projects
76
39%
Arbitration
0
Overdue
0
Free
7
Developer 7
Rating
(5)
Projects
6
0%
Arbitration
3
0% / 100%
Overdue
0
Free
8
Developer 8
Rating
(42)
Projects
62
8%
Arbitration
12
58% / 42%
Overdue
1
2%
Free
9
Developer 9
Rating
(39)
Projects
51
4%
Arbitration
4
0% / 75%
Overdue
4
8%
Working
10
Developer 10
Rating
(9)
Projects
8
0%
Arbitration
5
0% / 80%
Overdue
1
13%
Working
11
Developer 11
Rating
(251)
Projects
402
38%
Arbitration
82
41% / 20%
Overdue
70
17%
Loaded
12
Developer 12
Rating
(34)
Projects
60
23%
Arbitration
11
73% / 9%
Overdue
3
5%
Free
13
Developer 13
Rating
(230)
Projects
410
34%
Arbitration
53
36% / 40%
Overdue
150
37%
Loaded
14
Developer 14
Rating
(34)
Projects
49
43%
Arbitration
3
0% / 33%
Overdue
14
29%
Working
Similar orders
1.Green Line (20 Moving Average): This line shows the average price over the last 20 periods. 2.Red Line (50 Moving Average): This line shows the average price over the last 50 periods. Buy Signal: - When the green line crosses above the red line, it's a signal to buy. - Place the stop loss below the red line (50 moving average). - The target is when the green line crosses below the red line again. Sell Signal: -
I work in trading with Trading View and I want to have a bot at the same time that will look for American stocks only with time intervals between 1 minute and 5 minutes that the bot will find for me in the graph of the same stock the candles of a hanging man, a sinkhole candle and the evening star because these three symbolize a serious trend reversal in addition That the bot knew according to the graph the
I have an EA and the code for the same , I want a particular option to be added to this EA. The option to be added is to do the below logic. Inputs to be added. Calculation Type 1) Percentage of Profit on Number of trades. Input Percentage 1) Percentage of Profit in % 2) Percentage of Loss in % Logic Check. 1) Count number of Buy / Sell open orders separately. 2) Check for Each buy / Sell positions , how many are in
Hello, I need to convert a trading view pinescript into a MT5 EA. It just need to trade when the signal appear with fixed SL and TP. If you have trouble to convert into MT5, MT4 can be possible as well
I need an expert advisor developer for my trading strategy where 2 simple moving averages and sell-stop-limit are utilized. The sell-stop-limit order will start once the price of currency pair reaches 150 pips from the intersection of 60-period and 15-period moving averages. The sell-stop-limit must be 75 pips below the price. The stop loss is 100 pips and take profit 200 pips
I am seeking an EA that can be attached to any 1 random charts out of 20 different charts and detects/limits the number of open trades. I do manual trading and would like to have a limiter to ensure i do not over trade. The checking algorithm should always check based on the Terminal and thus, attaching to any chart should not pose any issues. Specifications - At any given point in time, there can only be a MAX
Please make a new pending order software and add it to the each of the Ea's that I would send the source codes. If any of the settings of the usual pattern of the Ea's have there in the EA's are not clear to you, then I will explain that part
Just have a look make it better enjoy and have fun 😊 this is the first time I am trying this, I got ripped off 3 times before. I hope this time works with all your help. Thank you kindly
hi, I'm looking for who can help me with my needed I must do changes to a dashboard with manual input of trader and active expert. Budget 30$ Can do
I have an MT5 EA which I like to modify to run on custom symbol chart. I can backtest the EA on the custom symbol chart, but I cannot run on the chart to trade. When I attach the EA to the custom symbol chart, it gives me error: "2024.06.07 21:27:59.270 Trades '1520250871': failed request buy 0.1 BTCUSD_ATR10_M1 at 69260.30000 [Invalid request]" Please help me to modify the EA to run on custom symbol chart. EA is

Project information

Budget
30 - 50 USD
For the developer
27 - 45 USD
Deadline
from 1 to 5 day(s)