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

Auftrag beendet

Ausführungszeit 3 Tage
Bewertung des Entwicklers
The BEST client I've worked with so far. Very straightforward, deliberate, and kind.
Bewertung des Kunden
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.

Spezifikation

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.


Dateien:

Bewerbungen

1
Entwickler 1
Bewertung
(18)
Projekte
22
9%
Schlichtung
6
33% / 50%
Frist nicht eingehalten
1
5%
Arbeitet
2
Entwickler 2
Bewertung
(16)
Projekte
35
23%
Schlichtung
4
0% / 50%
Frist nicht eingehalten
2
6%
Arbeitet
3
Entwickler 3
Bewertung
(39)
Projekte
57
18%
Schlichtung
6
33% / 17%
Frist nicht eingehalten
1
2%
Frei
Veröffentlicht: 2 Beispiele
4
Entwickler 4
Bewertung
(442)
Projekte
570
37%
Schlichtung
106
39% / 33%
Frist nicht eingehalten
17
3%
Frei
5
Entwickler 5
Bewertung
(1)
Projekte
1
0%
Schlichtung
3
0% / 100%
Frist nicht eingehalten
0
Frei
6
Entwickler 6
Bewertung
(504)
Projekte
971
74%
Schlichtung
27
19% / 67%
Frist nicht eingehalten
100
10%
Arbeitet
Veröffentlicht: 1 Artikel, 6 Beispiele
7
Entwickler 7
Bewertung
(2)
Projekte
3
0%
Schlichtung
3
0% / 67%
Frist nicht eingehalten
0
Arbeitet
8
Entwickler 8
Bewertung
(2)
Projekte
0
0%
Schlichtung
5
0% / 60%
Frist nicht eingehalten
0
Frei
9
Entwickler 9
Bewertung
(24)
Projekte
30
13%
Schlichtung
12
0% / 75%
Frist nicht eingehalten
8
27%
Frei
Ähnliche Aufträge
I have an existing MT5 Expert Advisor (“E-Core”). I need an experienced MQL5 developer to integrate a structured risk management upgrade and a higher timeframe trend filter into the current code. Two files will be provided: 1️⃣ E-Core Source Code (Current Version) 2️⃣ Update Instructions File (contains exact inputs, functions, and logic to integrate) The developer must: Integrate the update logic
DO NOT RESPOND TO WORK WITH ANY AI. ( I CAN ALSO DO THAT ) NEED REAL DEVELOPING SKILL Hedge Add-On Rules for Existing EA Core Idea SL becomes hypothetical (virtual) for the initial basket and for the hedge basket . When price hits the virtual SL level , EA does not close the losing trades. Instead, EA opens one hedge basket in the opposite direction. Original basket direction Hedge basket direction (opposite) Inputs
Billionflow 30 - 100 USD
Trading specifications: Indicators: Bollinger band ( Period 40, Deviation 1 apply to close) Moving Average (Exponential ) Period 17 applied to high Moving Average ( Exponential ) Period 17 applied to low But Signal enter a buy trade when prices crosses the lower band of the bollinger band up and also crosses the moving average channel of high and low the reverse is true for sell signal
Hello, I am a user of the "BUY STOP SELL STOP V6" trading bot, which is an advanced Grid System bot. The bot is primarily designed for Gold (XAUUSD), but I want it to work on all currency pairs. "The bot contains a privacy/protection code that prevents it from running on other accounts or being modified on any platform, as it has a client account number lock mechanism" --- Bot Description & Current Settings Bot Type
I am looking for a highly experienced Pine Script v5 developer to build a professional, non repaint price action indicator for TradingView. or a ready made one so i can purchase. This is a structured two phase project. The goal is to create a clean, intelligent price action tool that works for both fast intraday trading and swing trading. Only apply if you have strong Pine experience and understand liquidity
Hello, I’m looking for an experienced MQL4/MQL5 developer to work with me on an ongoing basis. My clients request services such as: Converting TradingView Pine Script indicators/strategies into MT4 or MT5 Expert Advisors Converting MT4 EAs to MT5 (and MT5 to MT4) Compiling and fixing existing MQL4 / MQL5 EA code Adding simple features like alerts, SL/TP, lot size, and basic money management This job is for
I am looking someone to create an EA based on my MACD Histo indicator / strategy from Pinescript. I will send it to you for you to replicate. The EA shall have: - Divergence length in bars, min and max values. - Pivot Logic - Entry on close of divergence confirmation bar. - Dynamic lot size dependent on SL/TP, in monetary value. - SL / TP in percent away from entry, separate values for long and short. - Time, day and
Hello, I have a breakout EA with reversal logic. I own the full source code for both MT4 and MT5 versions. I need the modifications implemented for both MT4 and MT5 versions. I need several modifications: – Multiple reversals with configurable parameters – Breakeven functionality – Entry only after candle close beyond range + offset – Time-based activation – Alternative offset calculation logic – Automatic close at
simple automated trading system with adaptive risk management and trend-based execution. The EA manages trades with dynamic position handling and built-in stability filters. Designed for single-position trading and disciplined execution 30 usd budget
PROJECT DESCRIPTION Looking for 1 experienced MQL5 developer to build 2 Expert Advisors for MetaTrader 5, targeting XAUUSD and major currency pairs. Strong preference for a single developer handling both EAs to maximize code reuse, reduce cost, and ensure consistency. EA1 — Grid Martingale Pro · Buy/Sell grid with Fixed or ATR Dynamic distance (ATR read once per fill, stored in grid_step_at_open[]) · Gap

Projektdetails

Budget
30+ USD
Ausführungsfristen
bis 2 Tag(e)