Job finished
Specification
Hello,
I would like you to add some lines of code to existing EA that I had from Strategy quant program (attachment .mq4). The program by default offers fixed lots, fixed sum and percent of capital money management only. I want to add 2 new money management methods to the EAs that can be also backtested in MT4 strategy tester.
Advanced money manegement methods ::
1. "consec wins" - form of positive progression martingale system. You start with 1 unit of risk per trade. When this trade is a winner you add +1 unit of risk to next trade (so the next trade is 2 units). If this wins again you add +1 unit (3 units now). Anyways if trade loses you start from beginning that is +1 unit. There is also a cycle target included. That is if there are e.g. 8 consec wins that can be defined as end of sucessful cycle ...then you go back to 1 unit risk and start a new cycle (picture below explains it better).
2. "consec adding" - form of positive progression martingale system. You start with 1 unit of risk per trade. When this trade is a winner you add +1 unit of risk to next trade (so the next trade is 2 units). If this wins again you add +1 unit (3 units now). Anyways if trade loses you substract -1 unit of risk for next trade.
There is also a cycle target included. That is if there are e.g. 8 consec wins that can be defined as end of sucessful cycle ...then you go back to 1 unit risk and start a new cycle (picture below explains it better). The +1 unit is default minimum in any case.
MM systems mentioned above are positive progression systems. Now I would like to code also a feature that can switch systems to negative progression system. It is like progressive systems above, but in reverse. For example negative progression "consec wins" system is on the picture below
To recap there are actually 4 MM system from core "consec wins" + "winner adding"
positive progressive "consec wins"
+1 unit after a win, back to 1 unit after any loss or a win at the cycle target.
positive progressive "consec adding"
+1 unit after a win, -1 unit after a loss, back to 1 unit after a win at the cycle target.
negative progressive "consec wins"
+1 unit after a loss, back to 1 unit after any win or a loss at the cycle stop-loss.
negative progressive "consec adding"
+1 unit after a loss, -1 unit after a win, back to 1 unit after a loss at the cycle stop-loss.
P.S. That is it! I would like to calculate one unit from fixed sum of money that are risked for a trade. For example there is SL of 79 pips that should equal for example to 100 dollars which is 1 unit (parameter of EA). Then 2 units are 200 dollars and so on. Also there should be a possibility to select either positive or negative MM to one of the 2 systems, can be something simple like true or false. Cycle target is an number that I would like to select in parameter inputs window for EA.
In any case the SL is taken from strategy quant code based on ATR or fixed stop loss for a trade in form of fixed money. I want this new MM to supersede MM from strategy quant and also possibility to backtest this MM in MT4 strategy tester.
Please let me know if it can be done!