Hi,
I am currently testing an EA on Alpari Micro but it wont let me use 0.01 lots. I would prefer lower lots due to the EA opening up multiple trades.
I tried to edit the code to show 0.01 but still says invalid. What am I doing wrong or not doing at all :-)
Code is below:
double GetSizeLot() {
double ld_ret_0;
if (IncreasingLot == FALSE) ld_ret_0 = Lots / 10.0;
if (IncreasingLot == TRUE) {
ld_ret_0 = MathCeil(AccountFreeMargin() / 10000.0 * LotsPercent) / 10.0;
if (ld_ret_0 < 0.1) ld_ret_0 = 0.1;
if (ld_ret_0 > LotsMax) ld_ret_0 = LotsMax;
}
return (ld_ret_0);
}
Thanks
Update: Found issue, was rounding up lot info in OrderSend
I am currently testing an EA on Alpari Micro but it wont let me use 0.01 lots. I would prefer lower lots due to the EA opening up multiple trades.
I tried to edit the code to show 0.01 but still says invalid. What am I doing wrong or not doing at all :-)
Code is below:
double GetSizeLot() {
double ld_ret_0;
if (IncreasingLot == FALSE) ld_ret_0 = Lots / 10.0;
if (IncreasingLot == TRUE) {
ld_ret_0 = MathCeil(AccountFreeMargin() / 10000.0 * LotsPercent) / 10.0;
if (ld_ret_0 < 0.1) ld_ret_0 = 0.1;
if (ld_ret_0 > LotsMax) ld_ret_0 = LotsMax;
}
return (ld_ret_0);
}
Thanks
Update: Found issue, was rounding up lot info in OrderSend