Modification of an existing EA to include position modification functions

MQL4 Indicateurs Experts Forex

Spécifications

The goal of this modification to this EA is to ultimately reduce the size of the losses while increasing the size of the wins. The stop loss is currently set as a function of the ATR, and all position modifications will also be based on the value of the ATR at the moment the initial order is placed. All modifications will go based off this initial ATR value and it will be fixed for the life of the trade. This modification will involve a good amount of position modification during a trade. 

-        When an order is placed the stop loss is automatically calculated and placed at the value of the ATR * 3

-        For losses, once the price has reached 20% of the ATR *3, or is 20% into the loss zone, I want it to take out 20% of the position size.

o    For Example, if the ATR is 10 then when the order is placed the stop loss will automatically be set at 30 pips below the entry price. Say that the initial lot size is 1.0. If after the order is placed it is not winning but is instead loosing, once it reaches a level of 6 pips (20%) below the entry price, I would like it to reduce the position size by 20% as well, so the lot size would now be 0.8. Similarly, once it reaches a level of 12 pips (40%) below the entry price, I would like it to again reduce the size of the position by 20% of the original position size, so now the lot size would be 0.6. I would like this to continue so that if I am stopped out on the trade, by the time it reaches the stop loss it will only be 20% of the original lot size. 

-        If the trade is initially making a loss and the position size is reduced, but then changes direction and reaches the open price of the trade, at break even I want it to add back in everything that it took out so that once it reached the initial entry price the position size is the original size it was when the order was first placed. 

-        I don’t want it to add back in every time a 20% level is reached going up towards the breakeven, that will complicate it, only add back in to make the original lot size one the current price is equal to the entry price. 

o    For Example, if the trade reaches a point where it is 40% of the way to the Stop Loss and has taken out 40% of the position size so the lot size is 0.6 and then returns to the initial entry price of the trade, only once it reaches that initial entry price will the full value of the initial lot size be restored. So once the price reaches the entry price it will then again have a lot size of 1.0. I don’t want it to average down into a loosing trade. 

-        When the trade is in profit I also want it to add into the lot size to increase it as the trade is winning. I want it to add in 20% of the initial lot size up to a maximum of three times. I want the EA to increase the lot size by 20% once a value of the initial ATR*3 is reached, and then another 20% once the value of the ATR*6 is reached, and a final 20% once the value of the ATR*9 is reached.       

o    For Example, when the order is initially placed the ATR is 10 and the lot size is calculated to be 1.0, once the position is 30 pips into the profit zone (ATR*3), then 20% will be added to the lot size, so the new lot size will be 1.2. Then if it keeps going up and reaches 60 pips above the initial entry level (ATR*6) it will again increase the lot size by 20% of the initial lot size, making the lot size now 1.4. Finally, if the trade reaches a point where it is 90 pips above the initial entry price (ATR*9), it would add another 20% of the initial lot size to the current lot size for a final lot side of 1.6. I only want it to add in a maximum of 3 times, not unlimited. 

-        The levels at which the EA will take out or add in money should be automatically set when the trade is first entered based on the ATR and then not change for the life of the trade. For example, if the ATR is 10 when the trade is entered, it should decrease the lot size by 20% at 6, 12, 18, and 24 pips into the loss zone and finally be stopped out at 30 pips below the entry price. Also, the EA should increase the lot size by 20% every time it is 30, 60, and 90 pips into the profit, a maximum of 3 times. 

o    If the ATR is 15 when the trade is entered, it should decrease the lot size by 20% at 9, 18, 27, and 36 pips into the loss zone and be stopped out at 45 below the entry price. Also, it should increase the position size by 20% when the levels of the ATR*3 (45), ATR*6, (90), and ATR*9 (135) are reached. 

-        The 20% values should be calculated from the initial lot size when the trade is first entered and not change. If the initial lot size is 1.0 then the 20% will be 0.2 and not change for the life of the trade. If the initial lot size is 5.0 the 20% will be 1.0 and not change for the life of the trade. 

-        Also, in the original version of this EA there is a break even function so that once it reaches a certain level of pips into the profit zone it can no longer lose money. For this, whenever the position size is increased the entry price will also move up a small amount because it is averaging the old entry price with the new one. Please make it so that every time the position is increased the break even line is moved up to 0 with the averaged entry price. 

Répondu

1
Développeur 1
Évaluation
(23)
Projets
45
20%
Arbitrage
24
29% / 46%
En retard
12
27%
Gratuit
2
Développeur 2
Évaluation
(356)
Projets
632
26%
Arbitrage
89
73% / 13%
En retard
12
2%
Gratuit
3
Développeur 3
Évaluation
(3)
Projets
2
0%
Arbitrage
7
0% / 86%
En retard
0
Gratuit
Commandes similaires
Hello, i would Like to convert my Ex4 file to mql4 file. The Expert Advisor is EX4 file convert it to mql4 file. I would like to add some exciting features on this EA like trailing stop loss, Take profit and stop loss to break even
the code wasn't mine, i have got it somewhere on the web, but i like the performance of the EA, so i want to use it on mt5 platform. the given code based on price movements with ladder entry concept
Preciso de um EA, que faça o fecho automático de operações abertas no final da sessão e nas notícias de alto impacto. Um EA simples com apenas 1 função. Fecho das operações abertas
Enter buy trade at close of candle when bar closes above the 3 emas. Emas are 34 ema, 64 ema and 128 ema. For a buy trade the 34 ema must be above the other two emas. The 64 ema should be in the middle. The 128 ema should be below the other two emas. For a buy trade the Awesome Oscillator should be above the middle line and colored green. Exit a buy trade when price touches 64 ema. Sell trade same conditions as buy
I want to make AI based on Attached Picture Swing High low. If you have experience can share demo first. Stop loss, take profit, trailing , break even ,DD etc. also amiable
Hello, I’m looking for a TradingView indicator that fits my forex trading needs. If you can create or customize one for me, please reach out. I'd appreciate your help! Thanks in advance."
I need someone who can code a new EA from scratch and also know how to integrate AI into the EA and use AI and market sentiments along with news to then open positions. I have the description of the job ready. Need someone serious, with experience and who will help optimize the current strategy with their expertise. Thanks
I’m looking for an experienced MQL5 developer to create a custom Break of Structure (BoS) Indicator for MetaTrader 5. This indicator should automatically detect and mark key market structure breakpoints in real-time, offering traders clear visual signals when the market experiences a structural shift. The indicator should include the following features: Automatic detection of Break of Structure (BoS) and Change of
Pls I need help I don’t have much but pls accept my little payment for the work thanks 🙏 mt5 file Once it opens buy and move positively to buy let it use auto trailing to follow the trend that’s if I choose to use trailing option and before the trailing starts it must reach the actual profit target example if I set profit target to 500 then once profit is at 500 let trailing immediately protect it and any 1 pip
I need a tested and profitable EA. I don’t want backtested EA but real live tested. At least, 5~10 % per month. Name your price!!! I also have a backtested EA that can’t make profit at the end of the month

Informations sur le projet

Budget
30 - 100 USD
Pour le développeur
27 - 90 USD
Délais
à 3 jour(s)