Modification of EA and fix some bugs

MQL5 Indicadores Experts

Trabalho concluído

Tempo de execução 19 dias
Comentário do cliente
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.
Comentário do desenvolvedor
Thanks for task, it was interesting! Wish you all the best!

Termos de Referência

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.

Arquivos anexados:

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

Respondido

1
Desenvolvedor 1
Classificação
(34)
Projetos
48
21%
Arbitragem
6
83% / 17%
Expirado
8
17%
Livre
2
Desenvolvedor 2
Classificação
(171)
Projetos
194
11%
Arbitragem
37
38% / 35%
Expirado
5
3%
Carregado
3
Desenvolvedor 3
Classificação
(204)
Projetos
209
28%
Arbitragem
0
Expirado
3
1%
Livre
4
Desenvolvedor 4
Classificação
(14)
Projetos
19
11%
Arbitragem
1
0% / 100%
Expirado
5
26%
Livre
5
Desenvolvedor 5
Classificação
(7)
Projetos
15
33%
Arbitragem
4
0% / 25%
Expirado
3
20%
Livre
6
Desenvolvedor 6
Classificação
(42)
Projetos
88
14%
Arbitragem
31
29% / 55%
Expirado
36
41%
Trabalhando
7
Desenvolvedor 7
Classificação
(133)
Projetos
174
18%
Arbitragem
17
47% / 18%
Expirado
0
Livre
Pedidos semelhantes
Im looking for an coder to code an EA: Trade management 1. opening trades according to the indicator 2. trades settings to choose from like: open all trades according to the signal open only trade 1,2,3 or 4 % per trade ( example 50/30/20 of the lot settings, with 4 trades it would be for example 50/30/10/10) 3. SL/Trailing settings: Move SL to entry after hitting TP1/TP2 or TP3 moving SL by % keep the original SL
Hi I'm looking to have 2 of my pinescript strategies converted to MQL5 and was wondering if you could first give me a quote for the more simple strategy and then for both the simple and complex strategy together. The simple strategy is a MACD crossover type thing that uses a special EMA script that filters out some ranging price action and also fractal candles for the stop loss. The second strategy is market
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
I have developed a very strong TradingView strategy in Pine Script but unfortunately, a third-party connector is requiired and in my opinion, I want a more direct connection. I am not brilliant at coding, but I have coded the majority of the MT5 code and I would like you to make sure that the MT5 code matches my TradingView script and executes the same way as the TradingView script that I will provide if you are
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Dr Pattern 30+ USD
good day i need the service of the seaso coder to help me fix my ea The Job required 1 knowledge of Mt4 and Mt5 indicator coding 2. Telegram code 3. ability to code indicator to work on multiple Time frame combine to trade 4 Ability to Join two or three indicator on same ir different time frame if you have these skill please let chart i will discuss the details of the Job inside to you The required day including
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown
Hello, I am looking for a professional programmer to create a trading expert on the MT4 platform, integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. Further details will be provided to the applicants later

Informações sobre o projeto

Orçamento
100 - 200 USD
Desenvolvedor
90 - 180 USD
Prazo
para 7 dias