I am demo testing and I want to code my EA in a manner that would result in trade sizes of 0.2 lots for every 1000 of Account Balance.
The closest I could get to that goal is the following, assuming a balance of 5000
double lot=1;
lot=NormalizeDouble(MathFloor(AccountFreeMargin()* 200)/1,1);
The closest I could get to that goal is the following, assuming a balance of 5000
double lot=1;
lot=NormalizeDouble(MathFloor(AccountFreeMargin()* 200)/1,1);
Comment