Hi all,
I am trying to figure out the mq4 language and believe I have found the problem with this EA.
The variables maximumrisk and maxlot size, even in the original EA before the last modifications, where not working. That is the reason why in my backtests (see above) it looses so much money during two specific points in time. I have tried optimizations using only those two variables, and nothing did change, ever. Moreover, if you see the code, its pretty obvious they are not taken into considerations.
So, here how it works. The EA opens 3 positions with the three different tp. If you enable the MM feature, the positions have the size specified in Risk. I.E. risk= 0.02 --> on a 10000usd account 10000*0,02/1000 = 0,2 lots. So as your account balance (remaining margin in the previous version) rises so do the lot size.
Now, is it loses more than one position, that is if you don't get at least tp2, then the next trade, either in the same way or opposite, will increase in size by the Increasefactor. So if you are in the 10K region, from 0,2 lots to 0,4 lots, and so on.
So when in my backtests, the eurjpy set got into wild variations, the EA tried to follow through, started losing positions, and increasing the position opened by x factor each time. That is a disaster until things stabilize again.
See post
http://www.forex-tsd.com/237369-post189.html
Without the MM feature, the EA just uses the Lots size specified, without any variations, ever.
Somethoughts I have over this, but sadly not the skills to do it, is to
a) enable the maxriskfactor so that when getting into such states it increases up to a fixed maximum, and/or
b) enable the maxlotsize, independently of MM feature, so that to stop increasing after reaching a specific lot size
To put it in other words, it would be intearesting to see this EA with MM
Risk and Maximum Risk or Lots and Maximum lots, both increased by Increasefactor when it lost more than one trade as it is now.
I have thought of stopping the EA after some series of losses, but don't think is the way to go.
Any programmer around willing to give it a go?? Any opinions??
Dispite the above problem. I have done many tests, back and forward and really love it. Thanks mas-awoo.