I would also try to combine the profits for buy and sell trades. Let's say that the first trade is a buy 0.1 and the next trade is a sell. Instead of opening a sell for 0.1, a sell for 0.2 could be opened according to the martingale multiplier. Total profit for both trades is calculated. If the next trade is buy, it will be opened for 0.4 etc. Eventually the ea beaks out with a profit and DD should stay quite low.