Modification of EA and fix some bugs

MQL5 Indicators Experts

Job finished

Execution time 19 days
Feedback from customer
Igor is smart, and software is his thing. He spent days and hours in this business. Even at 3, 4, 5 o'clock at night. Patience may be the right word to describe itself. Thanks.
Feedback from employee
Thanks for task, it was interesting! Wish you all the best!

Specification

Hello Everyone,

I want to make additional additions to the EA I use in my current hand. If it is possible.
Main plugins i want: An add-on to TrailingStop and take profit in case of multi-robot (EA) usage. And minor fixes.
The explanations may be long, to be more descriptive, but I am definitely not talking about a complicated plugin.

Avaliable features - Exists:
--------------------------------
* When the number of positions increases, the following is also increased: step between positions, lot size, take profit (martingale)

With the increase in the number of positions:
the step between positions is increased;
the distance of take profit is increased.
If a signal emerges and the number of positions is equal to the limit, one more position is opened and at the next bar (if there is a signal to open a position)
the most losing position is closed.
Protection of profit: if protection is allowed and the total profit of all positions is greater than the specified value,
as well as the number of positions is greater than or equal to the protected amount, the most profitable position is closed.
For example, we have a total profit of $52 and four open positions. The protected amount is set to "3". So we can close one position,
thus trying to keep a minimum of three positions always open.

This EA's current Input Parameters; (Exists)
** Lots (if <= "0" -> "Risk" is used) - position volume (if <= "0.0", lot "Risk" parameter will be calculated audibly); >>>>Available and used.
** Stop Loss (in pips) - Stop Loss value; >>>>Available and used.
** Take Profit (in pips) - Take profit value; >>>>Available and used.
** Trailing Stop (in pips) - trailing value; >>>>Available and used.
** Trailing Step (min value == 1) (in pip) - trailing step value; >>>>Available and used.
** Percentage risk for a free margin deal - risk per trade as a percentage of free margin; >>>>Available and used.
** Maximum open quotes - the maximum number of open positions (eg = 5) as well as the maximum one-way open position limitation (eg = 3) (Buy or Sell); >>>>Available and used.
** Interval between positions - the distance between positions; (must be in bars.) >>> >>>>Available and used. (it is not working right now.)
** Coefficient interval between positions - multiplier for the step between positions; >>>>Available and used.
** Coefficient Take profit - multiplier for the Take Profit step; >>>>Available and used.
** Min profit. Close max profit position - minimum profit, at which the most profitable position will be closed; >>>>Available and used.
** Account protection. If "true" -> closes max profit position - maintains profit at which the most profitable position will be closed; >>>>Available and used.
** If "account protection" = "true" then number of items open - number of locations to protect; >>>>Available and used.
** Reverse case - reversal signals;  >>>>Available and used. (You can remove this part. I don't need Reverse Signal.)
** Max volume of position - maximum allowed position volume; >>>>Available and used.
** Lot coefficient - lot multiplier, the more open positions exist, the greater lot multiplier will be. >>>>Available and used.
** BenefitK. I have added it. (Maybe in need of some regulation)   >>>>Available and used.
These are Okay.
----------------------------------------------------------------------------------------------------------------------
The Original EA is here: >>>  https://www.mql5.com/en/code/19598. ( I transformed from this orginal EA )

I changed the ZeroLag indicator and just added the MACD Average Signal Line instead.
The indicator i used here: >>>  https://www.mql5.com/en/code/20242


----------------------------------------------------------------------------------------------------------------------

In addition i want;

----------------------------------------------------------------------------------------------------------------------
1-)
The current Classic Trailing Stop and Follow-Up Step is ok. With the additional add-on I want,
after the position is taken to the ground and the classic Trailing Stop is activated,
the following Stop will approach the price as much as the value determined by the input, as well as the value of xx bars (eg = 7 bars).
Let's call this additional plugin BarStep.
Let's call the Bar number to wait after Trailing Stop is activated, Bar
Stop. In this example;
BarStop = 7 Bars
BarStep = 15 points
If I will explain over the sample values ​​here. After Trailing Stop is activated, 7 bars will be expected, nothing will happen.
Meanwhile, only normal Trailing Stop and Trailing Step will be active and will work normally.
After 7 bars, the Trailing Stop level will approach the price by 15 point s at each new bar. (eg BarStep = 15 point s)
The logic here after waiting for a certain period of time (time = bar) and the next stop gets smaller depending on the time (time = bar) and gets smaller with each bar.
Also, keep TralinStep active with the addition of this plugin. Let it run normally.
Both the following step and the Confirmation Step depend on the checkmark. It would be great if that way was possible.
With the Srtategy tester I can optimize and update the values ​​here.
Let's add True - False to this addition. If it doesn't give very good results, let it be disabled. Or if Int BarStep = 0 it means false.
However, in this case, standard Trailing Stop, Trailing step will be active.
Illustrative example:
--------------------
Current price (Example: after 7 bars) = 1.20350 >>> Profit = 350 point s, Guaranteed Profit = 50. (because it is in 50 interval >> 330 - 380 between)
Trailing Stop: 280 pips (1,20050)
Trailing Step: 50
The parameter I want is a new property and name it BarStep = 15 (for example)
Let's assume the price is fixed: 1.20350
8th Bar>> Trailing Stop: 280-15 = 265 points (1,20065) (15 point s slipped up)
9th Bar >> Trailing Stop: 245-15 = 210 pips (1.20080) (15 point s slipped up)
10.Bar>> Trailing Stop: 210-15 = 175 pips (1.20095) (15 point s slipped up)
15. Bar>> Trailing Stop: 175 -15 * 5 = 0 pips (1.20170) (75 point s slipped up)

2-) If this newly modified EA is used at the same time, for example 2 different symbols and 4 different time parameters;
Feature of Multicurrency.
For example: EURUSD 1H, EURUSD 30M, USDCAD 2H and USDCAD 15M (I usually work on 5-digit symbols.)
If the profit of the total calculation for all robots (EA) reaches the level of all = 1000 point s (xxx point s),
then the most profitable xx position (i.e. = 3) and the most losing position (e.g. = 2) I want it to be closed.
It should have the option True-False or it can also mean false (if the value = 0). // --- You can add a comment. It does not matter.
I do not know if 1000 point s are correct logic here. I don't know if point s can be collected in different symbols.
Perhaps instead of fulfilling the requirement to reach 1000 point , a condition of reaching a specified percentage of the Eqquity or balance can also be created.
This part depends on the software developer's decision. (Let me repeat that I usually work on 5-digit symbols.) I didn't know which one would be correct.
Of course a robot takes care of its own trades, usually opening its own trades, closing its own trades. An additional feature I mentioned.
In other words, this new EA I want will be able to intervene in the positions of other robots, regardless of MagicNumber and ticketNumber, when a special requirement is met.
In order for this feature to be added, in addition to 1 special magic number for each new position, the second universal can have an identical magic number!
I think it can be solved this way.

3-) I mentioned above. In addition to the open position limitation as well as the maximum one-way open position limitation (eg = 3) (Buy or Sell)
Total position two way can be xx ( eg = 5 ) but one way positions must be xx ( eg = 3 )

4-) If the profit of open positions reaches the limit of > 0 and for example 600 point s (xxx point ),
I want the feature to then the most profitable xx position (i.e. = 2) and the most losing position (e.g. = 1) I want it to be closed.
for this 1 EA's 1 symbol's magicNumber and this EA robot. And must be True-False options or if value equals = o it is false. (// --- You can add a comment.)
There is this part, but it actually means that the existing benefitK is modified with the eyes of the programmer.

5-) There is an active feature currently in use; (it is some similar to item 4)
"If a signal emerges and the number of positions is equal to the limit, one more position is opened and at the next bar (if there is a signal to open a position)
the most losing position is closed."
I want to change this feature like that;
If a signal emerges and the number of positions is equal to the one-way limit, one more position is opened and at the next bar (if there is a signal to open a position)
the most losing position is closed and with this most benefit position is closed if any.
This the most losing position is closed. ok. But most benefit position is closed if any. Let's add true - Fals to this section, please.

6-) Slippage value is true i dont know! How much must it be? i cant know abut it.
And digit problem; Actually it is seem normal. But there are a problem. i fixed it some like just as follows.
// --- tuning for 3 or 5 digits
   int digits_adjust = 1;
   if (m_symbol.Digits () == 3 || m_symbol.Digits () == 5)
      digits_adjust = 1; <<<<<<(( Originally this number is 10. EURUSD doesn't work properly if you don't set it to == 1 ))
                                  
   m_adjusted_point = m_symbol.Point () * digits_adjust;

   ExtStopLoss = InpStopLoss * m_adjusted_point;
   ExtTakeProfit = InpTakeProfit * m_adjusted_point;
   ExtTrailingStop = InpTrailingStop * m_adjusted_point;
   ExtTrailingStep = InpTrailingStep * m_adjusted_point;
   ExtIntervalPositions = InpIntervalPositions * m_adjusted_point * 10; <<< ((EURUSD doesn't work properly if you don't set == 10 here. İf here 10 everything is ok.))

Can you fix this part please. Because it is not working right.

SL TP lots etc. must work truely in 5 digit symbols. At the same time on 3 digits.

7-) And it constantly opens selling positions. I did not understand the reason for this either. I changed the conditions.
Again, the situation has not changed. I wrote the simple conditions again. The same EA: 174 sell, 14 buy !!! (15M, 10M, 5M) in 15 days.
I don't see anything strange when I examine it. I have examined the Buy-Sell conditions again, it seems like there is no mistake!
Moreover, everything is normal in the strategy test.
I would be glad if you can also look at this topic.

----------------------------------------------------------------------------------------------------------------

You Please submit the final and edited version of the EA file with its open codes, after testing and checking.
Of course, I'll have to retest on the demo account later.

Thank you, and good luck with.

Files:

MQ5
Macd_Av03.mq5
130.5 Kb
MQ5
MSRoC.mq5
5.0 Kb
PNG
Sample01.PNG
200.5 Kb
PNG
Sample02.PNG
47.3 Kb

Responded

1
Developer 1
Rating
(34)
Projects
48
21%
Arbitration
6
83% / 17%
Overdue
8
17%
Free
2
Developer 2
Rating
(166)
Projects
189
10%
Arbitration
37
38% / 35%
Overdue
5
3%
Working
3
Developer 3
Rating
(184)
Projects
188
27%
Arbitration
0
Overdue
3
2%
Free
4
Developer 4
Rating
(14)
Projects
19
11%
Arbitration
1
0% / 100%
Overdue
5
26%
Free
5
Developer 5
Rating
(7)
Projects
15
33%
Arbitration
4
0% / 25%
Overdue
3
20%
Free
6
Developer 6
Rating
(40)
Projects
86
13%
Arbitration
29
31% / 48%
Overdue
35
41%
Loaded
7
Developer 7
Rating
(124)
Projects
159
18%
Arbitration
16
38% / 19%
Overdue
0
Loaded
Similar orders
Crpyto Indicators 75 - 100 USD
2 Indicators: One for BTC/USD and one for ETH/USD Create indicators which plot the MVRV of Bitcoin and Ethereum as a line, standardized by a Z Score Essentially Zscore = ( MC - MCRealized ) / STD ( MC(number of bars ) Indicators should work on the daily timeframe at a minimum, and smaller ones if possible. Indicators should be able to work with future data as well, meaning it can download what's necessary to then
Hi there Here is a video of the logic: its based on market structure and swings using validated highs and lows based on candle closure. Just in case you would like to take a look at the code/indicator here is the link: https://youtu.be/igj0OaQoM7o?si=7nigL8OU2Nt1Zxkx Let me know if you can help
I am looking for a professional developer to help me with creating a hedge grid bot. The concept is in the picture. The bot is quite simple. The bot basically opens buy and sell positions on each grid and self terminates when the upper limit (manually set is reached) 1. Set timer for new's releases (manual entry) 2. Slippage in pip's (manual entry) 3. Maximum drawdown in USD with self termination when entry
I need alerts for 2 kinds of triangles (contracting & expanding) and 2 kinds of channels (up & dn) before that you should be able to put trendlines to any buffered (usually 0 & 1) zigzag indicators the method of drawing trendline is different i can show them with the pictures
Nt8 30+ USD
I trade in NT8 and would like to code an Elliott wave measurment tool, which is very easy because I have the major Script for that.We need only to add some aspects into it. If you are interested,if you can do this do well to bid on it
Hi I am looking for converting an indicator from MT4 to Mt5 It is Tom De Mark sequential This code is based off of the Tom DeMark TD Sequential Indicator. Basic criteria is as follows: | | TD Setup | TD Countdown | |------------------ |---------------------------------------------------- |---------------------------------------------------|
Tradingview indicator 30 - 50 USD
Looking for a tradingview expert to do a quick job . It is an indicator so apply only if you are capable. Price is negotiable Check attached file and proofs that you can get it done perfectly
Blue Angel Shark 30 - 120 USD
I would like a coded indicator that is able to combine Smart money concept, Pure price Action and Pine script so as to spot trade entries by giving Take profits and Stop loss should also be compatible with all timeframes in trading and also work with all forex markets and Derived synthetic indices. I will upload a picture below. Kindly
I need you to convert this tradingview indicator (PineScript) to MT5. The indicator need to work in any time frame and as the proposed script. It need to plot the ATR bands (as you can see in the attached image) and work as the proposed routine of ATR bands, when price close above or below the bands, the bars will change color (as you can see in the script and the image attached). Instead of sending alerts of buying
"Seeking an adept developer to help realize my custom NT8 strategy. Your expertise is integral to achieving success in this project. Are you interested in teaming up for a productive collaboration? Let's discuss the details together. Thank you!"

Project information

Budget
100 - 200 USD
For the developer
90 - 180 USD
Deadline
to 7 day(s)