Write a code to execute trades when SL is hit

MQL5 Uzmanlar

İş tamamlandı

Tamamlanma süresi: 2 gün
Müşteri tarafından geri bildirim
Great Job
Geliştirici tarafından geri bildirim
Thanks

Şartname

p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 14.0px 'Trebuchet MS'; color: #313131}


p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 14.0px 'Trebuchet MS'; color: #313131} li.li1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 14.0px 'Trebuchet MS'; color: #313131} ol.ol1 {list-style-type: decimal}

I have an EA that open trades when my entry conditions are met. It usually executes one trade per day. I'd like to add an option to be able to execute more trades in the same direction of the initial trade when the SL is hit. 

It needs to add positions every time the SL is reached until whether 

  1. TP is hit, or
  2. 2. Maximum number of trades is reached.

Lot size: add the losing position to the next position (for example, if the first position lose 200$, you add the 200$, to the profit of the 2nd posn and etc.) See the profits and losses written in yellow in the image.

SL and TP: every added position will need to have the same SL and TP distance.

Input needed: Maximum number of trades

It is important that the code take into consideration that it can have two or more trades open at the same time for the same symbol.

I can provide the EA I have written if you need it.


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(22)
Projeler
21
10%
Arabuluculuk
4
25% / 75%
Süresi dolmuş
0
Serbest
2
Geliştirici 2
Derecelendirme
(329)
Projeler
515
19%
Arabuluculuk
35
46% / 31%
Süresi dolmuş
34
7%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(62)
Projeler
90
29%
Arabuluculuk
24
13% / 58%
Süresi dolmuş
7
8%
Çalışıyor
4
Geliştirici 4
Derecelendirme
(23)
Projeler
34
53%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
1
3%
Serbest
5
Geliştirici 5
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
6
Geliştirici 6
Derecelendirme
(325)
Projeler
330
71%
Arabuluculuk
2
100% / 0%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
7
Geliştirici 7
Derecelendirme
(1)
Projeler
1
100%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
8
Geliştirici 8
Derecelendirme
(40)
Projeler
55
62%
Arabuluculuk
2
50% / 50%
Süresi dolmuş
0
Serbest
9
Geliştirici 9
Derecelendirme
(369)
Projeler
458
55%
Arabuluculuk
24
58% / 17%
Süresi dolmuş
31
7%
Çalışıyor
10
Geliştirici 10
Derecelendirme
(443)
Projeler
570
37%
Arabuluculuk
106
39% / 33%
Süresi dolmuş
17
3%
Serbest
11
Geliştirici 11
Derecelendirme
(390)
Projeler
416
30%
Arabuluculuk
74
19% / 72%
Süresi dolmuş
52
13%
Çalışıyor
12
Geliştirici 12
Derecelendirme
(43)
Projeler
49
29%
Arabuluculuk
4
25% / 25%
Süresi dolmuş
0
Serbest
13
Geliştirici 13
Derecelendirme
(30)
Projeler
38
29%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
2
5%
Çalışıyor
14
Geliştirici 14
Derecelendirme
(298)
Projeler
478
40%
Arabuluculuk
105
40% / 24%
Süresi dolmuş
82
17%
Yüklendi
Yayınlandı: 2 kod
15
Geliştirici 15
Derecelendirme
(52)
Projeler
67
43%
Arabuluculuk
8
0% / 100%
Süresi dolmuş
3
4%
Serbest
16
Geliştirici 16
Derecelendirme
Projeler
1
0%
Arabuluculuk
4
0% / 50%
Süresi dolmuş
0
Çalışıyor
Benzer siparişler
Je cherche un développeur MQL4 / MQL5 expérimenté pour créer un robot de trading automatique (Expert Advisor) performant et sécurisé. Validation de comptes Prop Firm capable de trader sur le forex et les matière première
XAUUSD Digger 50 - 300 USD
I want you to create a strategy that fits for my funded account conditions like winrate of 60%+ with good risk reward ratio min 1:2 and max drawdown per day is 2% or 3% and overall should be less then 10% with less consecutive losses should be able to finish the funded stage in of phase 1 8% target and phase 2 of 10% target in a month with good number of trades in a month need journal of all the back tested data and
I need a simple Expert Advisor for MT5 that trades based on RSI overbought/oversold levels. - Entry: Buy when RSI(14) < 30, Sell when RSI(14) > 70 - Exit: Take Profit and Stop Loss as adjustable input parameters (default 50/25 pips) - Position sizing: Risk 1% of account balance per trade, auto-calculated from stop-loss distance - Timeframe and currency pair: adjustable inputs, not hardcoded - Should include basic
1. Trading Instruments: - The robot should trade exclusively on the following currency pairs: - NZD/CHF - NZD/USD - GBP/USD 2. Trading Style: - The robot should implement a day trading strategy, focusing on short-term trades. 3. Risk Management: - Maximum drawdown percentage: 10%. - Stop loss settings: Adjustable based on volatility (suggested default: 30 pips). - Take profit settings: Adjustable
I have an existing working MQL5 Expert Advisor and require an experienced MQL5 programmer/trading-system analyst to independently analyse its historical performance. This is NOT initially a request to rewrite the EA or simply optimize parameters. Current strategy: - MetaTrader 5 - M15 timeframe - EMA / ADX / ATR based - Approximately 1,337 historical trades - Gross Profit approximately USD 271,000 - Gross Loss
Gold robot 30 - 1000 USD
Hello everyone, I’m looking for a developer who has an algorithm in their arsenal that generates quick profits over the long term. I’m interested in a scalping expert advisor—it can be a one-shot, averaging, or grid strategy, with or without TP/SL. Please share your ideas and results; I’ll consider all options. The most important thing is the result. Good luck
Zwivhuya 100+ USD
I would like to be part of this trade because i want to help my family out of the hopeless life we are living now . i thoughts going to school will help me get better job but no i am still sitting for us to eat at home i have to sell my body to someone and get pay with that small money i can buy bread and cooldrink for my family that we can not sleep with emyter stomach
I need an Expert Advisor that trades by signal of ADX and Moving Average indicators. It must check and correctly process possible errors in trading operations. The main criteria of opening and closing positions , direction of Moving Average, Price of last bar . Set the number of lots to trade as an input parameter
I need a new custom MT5 Expert Advisor for XAUUSD.sc on my Vantage cent account. I do not have a ready trading strategy. Please propose simple, specific entry, exit and risk rules first. I will approve the rules before development starts. The EA must open and close trades automatically, place a stop loss on every trade, and have adjustable lot size and maximum loss settings. I do not want martingale or increasing lot
I need an Expert Advisor based on Vantage signals.It must have check and handling of trade operation errors. The main criteria for opening and closing a position: moving average direction the price is higher the previous bar Trade lots is an input parameter

Proje bilgisi

Bütçe
50 - 100 USD