MT4 robot/script that closes equal buy and sell lots of active trades while realizing a set loss.

MQL4 Experts

Specification

Hello 


Set up

I have an account that has a floating loss(eg -1000)

with 1 buy trade and several sell trades (or 1 sell trade and several buy trades)  with 

the t otal buy lots being the same or similar to sell lots.

(note the above are not conditions ,the EA has to check . Is information of when I am likely to use it so the bottom make more sense)


What the EA would do when it loads

 I want to specify a percentage of floating loss to be closed. 

eg : if floating profit is -1000  and I specify  30.   EA will close the necessary trades that would close trades with a loss of -300 and leave floating profit of -700 .

Conditions

1) The robot would have to close FIRST the trade that opened the FURTHEST away (does not matter if profit or loss) from current market price.

and proceed in that order when closing trades.

2) The same number of buy lots as well as sell lots have to close during this. 

Hence every time some lots buy close ,the equivalent sell lots have to close 


Notes:

-Some trades would close with partial lots. 

-Some trades would close with profit/some with loss.


So the EA will have to calculate the correct lot sizes for both directions to achieve the 30% reduction(variable) in floating loss while closing the same number of lots for each.


Regards

Responded

1
Developer 1
Rating
(9)
Projects
19
16%
Arbitration
3
67% / 0%
Overdue
0
Free
2
Developer 2
Rating
(68)
Projects
124
40%
Arbitration
17
47% / 53%
Overdue
31
25%
Loaded
Similar orders
//+------------------------------------------------------------------+ //| EMA + Resistance Break & First Retest EA - ATR SL/TP - Risk 3% | //| Fully working MT4 EA | //+------------------------------------------------------------------+ #property strict //---- Inputs input double RiskPercent = 3.0; input int ATR_Period = 14; input double SL_ATR_Multiplier = 1.5; input double TP_ATR_Multiplier
SMC Trading Bot 50 - 100 USD
📌 Looking for MQL5 Developer – Institutional SMC EA Specification Hello everyone, I am looking for a highly experienced MQL5 developer to build a fully automated Expert Advisor (EA) based strictly on Smart Money Concepts (SMC) , designed to operate and pass prop firm accounts . 🔍 Core Strategy Requirements (SMC Only) The EA must be based on institutional Smart Money Concepts , including: ✅ Market Structure (BOS
Create simple EA 30 - 60 USD
Start BUY:- when i click start BUY button new panel should open which should contain bellow points:- Trigger Price Time frame Cross/Close RR ration Trailing Stop ratio Maximum Trade count Risk (percentage or cash) (Option to Increase risk when SL hit) Remove Trigger (True/False ) I will explain above point one by one here bellow •Trigger price :- here we enter price at which when market cross or
I’m a trader looking to develop a non-repainting indicator intended for integration with an EA. I identified a comparable indicator on the MQL5 Market, but it’s unclear whether its logic can be accessed or automated for algorithmic execution
I want to check if this indicator is repainting or not Whick mean the results of back testing is legit or not if anyone can help me to review it kindly to well to contact me i will be happy to work and go on long term work with anyone thanks
Bot sympaFX 30+ USD
Stratégie : "Institutional Flow Scalper" La stratégie repose sur la confluence de la tendance structurelle et de la valeur moyenne pondérée . Actifs cibles : EURUSD, GBPUSD (Spread faible, forte liquidité). Sessions : Londres (09h00 - 12h00) et New York (14h30 - 17h30 GMT+1). Indicateurs : EMA 200 : Filtre de tendance long terme (M5). VWAP : Ancre du prix institutionnel. On achète sous le VWAP en tendance haussière
PrimeFlowEA — v1 Specification Objective: PrimeFlowEA v1 is designed to enforce disciplined, rule-based execution within a single daily trading session. The goal of v1 is correct behavior and execution discipline , not optimization or performance tuning. 1. Market & Time Platform: MetaTrader 5 (MQL5) Symbol(s): User-selectable (single symbol per chart) Execution timeframe: Configurable (default: M5 / M15)
Top manager 70 - 120 USD
A multi-symbol, rule-based trade management Expert Advisor designed to recover, neutralize, and scale out of DCA baskets using intelligent closing logic and full manual control through an on-chart dashboard. The EA continuously scans multiple symbols and monitors all open trades with a specific magic number. Based on trader-enabled rules (R1–R4) and Break-Even modes (BE1–BE3), it selectively closes trades when
Specifications – Development of an MQL5 Expert Advisor (Reverse Engineering) Project context: I have access to a real trading history consisting of more than 500 trades executed over a period of approximately 3 years. These trades have been exported into a CSV file containing all available information, including date, time, symbol, order type, entry price, and exit price. Important: I do not have access to the
1.Sinyal Perdagangan : Sinyal beli: garis MACD utama memotong garis sinyal ke atas (macd_current>signal_current && macd_previous<signal_previous). Sinyal jual: garis MACD utama memotong garis sinyal ke bawah (macd_current<signal_current && macd_previous>signal_previous). Gambar di bawah menunjukkan kasus beli dan jual. 2. Posisi ditutup pada sinyal yang berlawanan: Posisi beli ditutup pada sinyal jual, dan posisi

Project information

Budget
45+ USD