Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
Hello,
I have a EA that trades based on a indicator, I need to add a second indicator as for the entry signal and also, I need to add a smart martingale recovery system.
The indicator that I need to add gives buy and sell arrows, they will need to work the indicator that is already in the EA, that is green color and buy arrow (green aow up) must be a buy signal and red color with a red arrow for the sell signal.
If I get green color on the first indicator and with red arrow, that is not a valid entry signal and if I get red color with green arrow that is also a invalid signal.
I will need a true/false parameter for the new indicator and also I need to be able to change settings (I need the second indicator parameters in the EA)
Here is how I will need the martingale to work:
If I will lose, I need to reovery martingale system to kick in, and on the next signal, it must enter with a adjusted lot size so that it can recover the previos lose. If another lose will folow, it must recalculate the lot size again, based on the total loses.
Also, I need to have the option to rocover over multiple folowing trades, I need a parameter to set the number of wins necesary to recover the loseand that can be in the next 2 trades or in the next 5 trades or even in the next 20 trades.
For example: If I lost 100, I need to have the option to recover the lose over the next 3 entry signal (3 x 33.3), or over the next 10 signals (10 x 10).
The martingale must be able to adjust the lot size that will be needed to recover over the preset next number of trades (I need a parameter were to enter the exact number of future signal to use for the recovery, it can be 1 or 3, or 15).
Also, if during the recovery cicle, anither lose will come, it will need to readjust the lot sizeand restart the recovery cicle from signal 1.
Here is a exact example: I will trade 1 lot with a 10 pips TP and a 40 pisp SL and I will set the Martingale recovery system to use the next 5 positions (signals) to recover my lose.
When I lose, I will have a negative 400, now the martingale recovery must kick in, devide the 400 to 5, that is 80 and then adjust the lot size so that with each 10 pips win it will reover 80 (that is 0.8 lots).
After 2 consecutive 10 pips wins, that is 160 , I will get another lose of 40 pisp with 0.8 lots , that is - 320 and out of the fisrt lose I still have -240 to recover. This will give me a total negative of -560.
Now, the martingale will have to devide my total negative of -560 to recover over the next 5 signals and that is to recover on a 10 pips win 112, so it will need to trade with 1.12 lots.
If i will suffer another lose, it will need to recalculate until I get a 5 wins in a raw recovery.
For the martingale I will also need a stop trading parameter that will need to be a % of the total account value.
For the martingale I will need a parameter to set how many next valid entry signals to use in order to recover the lose, that can be 1 or 9999999 and also a paramter to set the account value %, when to stop all entry signals and all trading.
All other parameters on the EA MUST REMAIN AS THEY ARE!
You will need to make sure that even when used over multiple instrumets, it will still work and do the right martingale management!
Thank you very much!