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

工作已完成

执行时间3 天
员工反馈
The BEST client I've worked with so far. Very straightforward, deliberate, and kind.
客户反馈
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.

指定

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.


附加的文件:

反馈

1
开发者 1
等级
(19)
项目
24
8%
仲裁
9
33% / 33%
逾期
1
4%
已载入
2
开发者 2
等级
(16)
项目
35
23%
仲裁
4
0% / 50%
逾期
2
6%
工作中
3
开发者 3
等级
(39)
项目
57
18%
仲裁
6
33% / 17%
逾期
1
2%
空闲
发布者: 2 代码
4
开发者 4
等级
(442)
项目
570
37%
仲裁
106
39% / 33%
逾期
17
3%
空闲
5
开发者 5
等级
(1)
项目
1
0%
仲裁
3
0% / 100%
逾期
0
空闲
6
开发者 6
等级
(510)
项目
977
74%
仲裁
27
19% / 67%
逾期
100
10%
空闲
发布者: 1 文章, 6 代码
7
开发者 7
等级
(2)
项目
3
0%
仲裁
4
0% / 50%
逾期
0
工作中
8
开发者 8
等级
(2)
项目
0
0%
仲裁
5
0% / 60%
逾期
0
空闲
9
开发者 9
等级
(25)
项目
31
13%
仲裁
12
0% / 75%
逾期
9
29%
空闲
相似订单
✅ MT4 EA Developer Checklist (For Your Ladder EA) 1️⃣ Indicator Integration EA reads signals from provided custom indicator (.ex4 or .mq4) Detects “Buy Next” / “Sell Next” signals on current candle Works with arrow-based or buffer-based signals 2️⃣ Next Candle Execution EA does not trade on the candle where the signal appears Orders placed only at first tick of the next candle Timeframes supported: M1, M5, M15
Hi to all, I need a modification of an existing grid EA with the following instructions: Add the following optional external inputs to the attached Expert Advisor: input bool TradeModeAgainstTrend ( TMAT ) = true ; input int CounterTrendLotsToStartTMAT = 0.15 ; input double CoefficientForTrendLots = 0.30 ; input double MaxTrendLot = 0.08 ; input bool OneSideTMATOnly = true ; input double CombinedClosureAmount = 10.0
Hello, i need expert developer that have been develop so many profitable AI bots that work for mt5 and ctrader autonomously if you know you can easily execute this requirement bid for it. NOTE:- YOU MUST COME WITH SAMPLE FOR THE 2 TRADING PLATFORM. While i take a look at your profile and reach out to you thanks
Dear developers I want to create an expert advisor for my strategy. The entry signals quite simple using OHLC, Bollinger, SuperTrend. (Possibly: ICT/FVG) The money and risk management is more difficult using martingale and trailing stops. I also need help to design this before any development
Hello, I am looking for someone who can help me to build a MT4/MT5 forex EA, by analyzing the trading history. You are responsible to find out trading logic behind the EA and Build a new EA that accurately replicates the existing strategy. I need someone who has proven previous experience to build a new EA by reverse engineering. Thanks
Risk management EA 30 - 200 USD
Looking to develop risk management EA for personal use probably commercially in the future. I want the EA to have a display panel with 0.1, 0.2, 0.5,1,2,3 percent risk management button. I also want BE, partial closure of 0.25,0.5,0.75 and full closure panel on both profit and loss. I’ll also like to include trailing stop, 2 trades max per day and BE+spread option. I’ll be attaching the image for a guidance on what
Sierra Chart Alerts to MT5 via Webhook (Alert Manager File Version) Objective: Create a Custom Study (ACSIL / C++) that monitors alerts from the Alert Manager file and forwards any valid alert directly to MT5 via an HTTP POST (Webhook) in JSON format. Additional Note: The study should allow adding any modifications in the future and provide clear insights into the alert points in Sierra Chart. 1. Data Flow Diagram
Ea.Mix 30+ USD
I am in need of a good scalping bot for gold or any currency pair. If you have one that is working, reach out. You must be able to provide a trial version so I can test the bot myself
MT5 Expert Advisor Development Project Overview I am looking for an experienced MQL5 developer to build a custom MetaTrader 5 Expert Advisor based on a grid-cycle trading framework. This is not a standard grid EA . The system combines: Session-based trade initiation Multi-filter signal generation Dynamic grid management Advanced basket management State-machine-driven trade lifecycle management Dynamic take-profit
I am in need of a good scalping bot for gold or any currency pair. If you have one that is working, reach out. You must be able to provide a trial version so I can test the bot myself

项目信息

预算
30+ USD
截止日期
 2 天