EA opening orders with random lot sizes
-
Hi,
I'm trying to create an EA with a true martingale/double down money management strategy. The martingale in the Buy/Sell block is not appropriate for this EA so I've built my own.
The EA will generally run fine but for some reason it seems to put in random lot sizes on some orders. The user defines the lot size for each step of the system so I'm confused why I'm getting other, seemingly unrelated, lot sizes coming through on the MT4 strategy tester.
Could someone please take a look and provide any insight as to errors in my EA or if this is possibly a bug?I've added a screenshot of the lots being generated in what should be a typical recovery mode. Lots sizes in the settings are 0.01,0.03,0.05,0.09,0.17,0.33,0.65,1.29. As you can see in the screenshot there is a 0.32 which is wrong. I've also had other sizes like 0.28, 0.08, etc. Seemingly random.

Many thanks
Ben
0_1505347725393_Martingale V2.mq4 -
Nevermind. Figured out the problem; account balance was too small for the trade sizes the EA needed to place. Instead it put on whatever it could with the margin left.
Cheers Everybody.