Buy/sell order risk fixed never works correctly

 

Hi everyboday. I have written an EA using Forex EA Generator. I want the EA to buy/sell 8 orders, each for 2% of the free margin, so I wrote it like that. A second EA should buy/sell one order for 4% of free margin. Result is: the first EA buys 8 orders of between 0.08 and 0.09 lots on a free margin of 50.000 Demodollars. The second EA buys 4,5 lots at the same free margin. So I change the first EA to buy/sell 8 orders, each for 20% of free margin (this should never work since 8x20% is 160%, not possible) but the EA then buys roughly ten times the lots than before (the free margin has changed a bit). What happens here? Anybody has experience with Buy/sell orders risk fixed?

Both EAs are written exactly the same way, only amount of orders and order numbers differ, same broker, same free margin, same account type.

Any help is appreciated.

Jay

 
jmillions :

Hi everyboday. I have written an EA using Forex EA Generator.

And the code is good or bad ? it's usually bad . . . if you want to fix it learn to code. If you need help why not ask Forex EA Generator ? if they don't offer help then perhaps you should post the code here . . . if you do please use the SRC button.
 
Reason: