Modify EA in MQL5 Language - Add an AutoCalculate Recovery Trade Size Based On Given Formulas

Trabalho concluído

Tempo de execução 3 dias
Comentário do desenvolvedor
The BEST client I've worked with so far. Very straightforward, deliberate, and kind.
Comentário do cliente
I am lucky to have found such a brilliant well spoken and humble developer. Jacobie, I only want to work with you from here on.

Termos de Referência

Current workings:
I have an MQL5 Expert Advisor for MT5 platform that triggers a market buy order when I press Shift b and triggers a market sell order when I press Shift s. The trade size is taken from the settings, and there can be a maximum of 10 trades given in the settings section.

After the order is triggered, it looks at the entry price, adds 50 points as take profit and feeds it into the order.

It does not use stop loss and has martingale style trades instead.

The first active order is a Main Trade (MT) and any second active order is called a Counter Trade (CT)

Option 1 - CT order hits take profit and makes $100 in profit. IF the MT order is in a loss of less than $100, EA closes the MT trade completely.

Option 2 - CT order hits take profit and makes $100 in profit. IF the MT order is in a loss of more than $100, EA closes some lots of the MT order up to $100 but never more.

 

EA can also select which active loss making order to adjust from the settings.
ALL THIS is working fine.
=============================

I need you to add an option that makes the EA AutoCalculate the correct CT trade size, instead of me manually guessing it every time.

Settings Will Have:
Input AutoCalculate CT Size                = True/False;                      (If True then…)

Input AutoCalculate CT TP                   = 50;                                  (Take Profit Points To Be Entered)

Input AutoCalculate CT Minimum Margin               = 10.00;             (Minimum Dollar Margin)

 

IF MT order is BUY & CT is SELL Order - AutoCalculate CT Size =

IF MT is BUY && CT is SELL

MT Buy Entry Price

       3,525.00

CT Sell Entry Price

       3,519.00

MT TP

                     50

CT TP

                     50

MT Buy Exit Price

       3,525.50

CT Sell Exit Price

       3,518.50

CT Minimum Margin

              10.00

 

(CT Margin - ((ENTRY price of Trade to Adjust-EXIT price of CT)*(0.10*100)))/ CT Take Profit

 

For example:
10+((3525.00-3518.50)*0.10*100)/50

(10 + (+65)) / 50

(10 + 65) / 50

75 / 50

= 1.50 lots


IF MT order is BUY & CT is BUY Order - AutoCalculate CT Size =

MT Buy Entry Price

       3,525.00

CT Buy Entry Price

       3,519.00

MT TP

                     50

CT TP

                     50

MT Buy Exit Price

       3,525.50

CT Buy Exit Price

       3,519.50

CT Minimum Margin

              10.00

 

(CT Margin - ((ENTRY price of Trade to Adjust-EXIT price of CT)*(0.10*100)))/ CT Take Profit

 

For example:

10+((3525.00-3519.50)*0.10*100)/50

(10 + (+55)) / 50

(10 + 55) / 50

65 / 50

= 1.30 lots


IF MT order is SELL & CT is BUY Order - AutoCalculate CT Size =

MT Sell Entry Price

       3,511.00

CT Buy Entry Price

       3,515.00

MT TP

                     50

CT TP

                     50

MT Sell Exit Price

       3,510.50

CT Buy Exit Price

       3,515.50

CT Minimum Margin

              10.00

 

(CT Margin - ((EXIT price of CT - ENTRY price of Trade to Adjust)*(0.10*100)))/ CT Take Profit

 

For example:

(10+((3515.50-3511.00)*0.10*100))/50

(10 + (+45)) / 50

(10 + 45) / 50

55 / 50

= 1.10 lots

 

IF MT order is SELL & CT is SELL Order - AutoCalculate CT Size =

MT Sell Entry Price

       3,511.00

CT Sell Entry Price

       3,515.00

MT TP

                     50

CT TP

                     50

MT Sell Exit Price

       3,510.50

CT Sell Exit Price

       3,514.50

CT Minimum Margin

              10.00

 

(CT Margin - ((EXIT price of CT - ENTRY price of Trade to Adjust)*(0.10*100)))/ CT Take Profit

 

For example:

(10+((3514.50-3511.00)*0.10*100))/50

(10 + (+35)) / 50

(10 + 35) / 50

45 / 50

= 0.90 lots

Important Notes

EA Must Compile correctly at my End. Any Trade folder files must also be submitted.
EA Trade Adjustment on AutoCalculate CT Size = True should be the same as when False
EA Must retain the same magic number and COMMENT after a trade has been adjusted.


Arquivos anexados:

Respondido

1
Desenvolvedor 1
Classificação
(17)
Projetos
21
10%
Arbitragem
4
50% / 50%
Expirado
1
5%
Trabalhando
2
Desenvolvedor 2
Classificação
(15)
Projetos
34
24%
Arbitragem
4
0% / 50%
Expirado
2
6%
Trabalhando
3
Desenvolvedor 3
Classificação
(39)
Projetos
57
18%
Arbitragem
6
33% / 17%
Expirado
1
2%
Livre
Publicou: 2 códigos
4
Desenvolvedor 4
Classificação
(442)
Projetos
570
37%
Arbitragem
106
39% / 33%
Expirado
17
3%
Livre
5
Desenvolvedor 5
Classificação
(1)
Projetos
1
0%
Arbitragem
3
0% / 100%
Expirado
0
Livre
6
Desenvolvedor 6
Classificação
(491)
Projetos
954
75%
Arbitragem
26
19% / 65%
Expirado
100
10%
Carregado
Publicou: 1 artigo, 6 códigos
7
Desenvolvedor 7
Classificação
(2)
Projetos
3
0%
Arbitragem
3
0% / 67%
Expirado
0
Trabalhando
8
Desenvolvedor 8
Classificação
(2)
Projetos
0
0%
Arbitragem
5
0% / 60%
Expirado
0
Livre
9
Desenvolvedor 9
Classificação
(24)
Projetos
30
13%
Arbitragem
12
0% / 67%
Expirado
8
27%
Trabalhando
Pedidos semelhantes
Project Overview I am looking for an experienced MQL5 developer to build a custom, prop-firm-compliant trend-following Expert Advisor (EA) for MetaTrader 5 . This EA will be used on prop firm accounts (e.g., FTMO-style rules), so strict risk control and rule compliance are mandatory . This is NOT a grid, martingale, scalping, or recovery EA. The goal is consistency, rule compliance, and capital preservation , not
I would like to buy ea that is proven to be good need to have stable profit and can be very unstable DD but not more than 40 %you can send eas in dm for sale. I am looking of an Expert Advisor (EA) that has undergone independent validation and demonstrates a capability to successfully navigate prop firm challenges, as well as efficiently manage funded accounts. It is imperative that you provide a comprehensive
I am looking of an Expert Advisor (EA) that has undergone independent validation and demonstrates a capability to successfully navigate prop firm challenges, as well as efficiently manage funded accounts. It is imperative that you provide a comprehensive explanation of the strategy utilized by your EA, along with a demo version that has a 30-day expiration. This will facilitate extensive back testing and forward
I am seeking a highly skilled developer to build a fully functional automated Expert Advisor for MetaTrader 5 (MQL5)- XAUUSD fast in and out EA scalper that opens multiple trades following trend, uses dynamic lot sizing, and has to be – 24/5 unlimited. require the development of a high-speed, continuous fully automated trading Expert Advisor (EA) for MetaTrader 5, optimized for live trading on ICmarkets. The EA must
Hellow,l hope you are well,l am writing to place an order for a professional trading robot.l am looking for a reliable,well optimized robot that can trade efficiently,manage risk properly and deliver consistent performance in the market,I am particularly interested in a trading robot that uses a proven and transparent strategy,has strong risk management features,works well on common trading platforms,is suitable for
I am looking for an experienced MQL5 developer to build a professional MT5 software (indicator or semi-automated EA) for metals and major forex pairs. 📌 PLATFORM & MARKETS Platform: MetaTrader 5 Instruments: XAUUSD (Gold vs USD) XAGUSD (Silver vs USD) EURUSD GBPUSD USDJPY Trading styles: Scalping Intraday / short-term swing 🎯 MAIN OBJECTIVE I do NOT want an aggressive fully automated robot. I want a
I am seeking an experienced freelance marketing and algorithmic trading specialist to develop a user-friendly automated trading bot for the Pocket Option platform. The system should feature a simple and secure interface that allows direct login using my existing credentials. The bot will be designed to operate exclusively on multiple OTC currency pairs (a minimum of 10, such as EUR/USD OTC, GBP/JPY OTC, and similar
The robot will take buy trades when the 2 ema cross over the 10 ema and price has closed above the 50 ema. The take profit and stop loss can be set as an optional level by the user. The robot will take sell trades when the 2 ema cross under the 10 ema and price has closed under the 50 ema. The take profit and stop loss can be set as an optional level by the user. The entry timeframe will be 15 minutes, but it could
GoldTrade EA 30 - 60 USD
Hi, I am looking for someone who has already developed a high-performance Gold EA that can outperform the one shown in my screenshot. If you have such an EA, please apply for this job. Please describe how the EA works (for example, whether it uses a grid system) and provide backtest results along with the set files. If the EA meets my expectations, you can make the necessary adjustments and I will use it as my own
I am looking for someone who has or who can modify the Margin Trader EA by MaryJane preferably the MT5 version by making it pyramid using a fixed lot size addition(preferably 1st trade lot size) instead of using all the margin available to define the lotsize

Informações sobre o projeto

Orçamento
30+ USD
Prazo
para 2 dias