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

MQL4 Experts

Termos de Referência

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

Respondido

1
Desenvolvedor 1
Classificação
(8)
Projetos
18
17%
Arbitragem
3
67% / 0%
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(55)
Projetos
96
40%
Arbitragem
13
38% / 62%
Expirado
25
26%
Livre
Pedidos semelhantes
I have a really very, very simple professional, proven, profitable forex strategy that works on a higher time frame with over 85% winning rate. I am searching a professional programmer to create expert advisor based on this stategy, in general I am searching a developer for a longer co-operation. I am a forex trader with over 12 years experience. telegram: fxMiguel It's a 15minute work job, 30min max, My budget is 10
Testing 30 - 200 USD
// กำหนดค่าตัวแปรเริ่มต้น input double DailyProfitTarget = 200; // กำไรที่ต้องการในแต่ละวัน (2% ของทุน) input double LotSize = 0.1; // ขนาด Lot input double TakeProfit = 10; // กำไรต่อการเทรดใน pip input double StopLoss = 5; // การหยุดขาดทุนต่อการเทรดใน pip double dailyProfit = 0; // กำไรที่ทำได้ในวันนี้ // ฟังก์ชันเริ่มต้น int OnInit() { dailyProfit = 0; return(INIT_SUCCEEDED); } //
I need to compile my mt4 EA but there are some errors and warning if you can fix and compile send me your application I will select you upon Demo
i need someone to help me take 6 pieces of code from this script and simplify it into a new code .. . note this project is needed urgently in 2 to 5
Man on mayhem 30 - 100 USD
1. The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction. 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below
We need an Expert Advisor for MetaTrader 5 that will be simply based on Rsi, chart patterns and price levels (e.g 2366,250)… Basically when the robot notices a chart pattern, for example “double top/M pattern” it enters a trade based on confirmation from Rsi & price level and the stop loss is moved to the entry price…That is all. The expert advisor is only for Xauusd/Gold…The expert advisor should target 10 pips
Hi, Expert should be Brazilian. I need the scalping ea for xauusd, usdjpy, AUDUSD, eurusd, gbpusd, nzdusd, uascad and usdchf with any strategy. But don't use buy limit in down trend and sell limit in sell trend. I need the profit with 0.5 usd minimum per trade
Hello, I am looking for an experience MQL5 coder who can help me automate my trading strategy. Since this is an advanced coding so I would appreciate if only an experienced coder reaches out. I have attached a word doc of strategy, if you think you can build it then do let me know. Thanks, Sadaquat
Grid hedging ea 30+ USD
I Need A Hedging Ea With Daily 2% of returns. I might think that ea work consistently. hedging Is The only Way To Make A Profit. That ea work in 1:200 Leverage and lot size is starting from 0.01
Project Description: I am looking for an experienced MQL5 developer to program an advanced trading robot for MetaTrader 5. This robot should integrate multiple modules for trend management, entry optimization, and risk management. It must also include an interactive dashboard and an automatic order suspension system based on volatility and economic news releases. The project requires expertise with ATR, ADX

Informações sobre o projeto

Orçamento
45+ USD
IVA (19%): 8.55 USD
Total: 53.55 USD
Desenvolvedor
40.5 USD