Skyline,
Can you change the comments in the ordersend functions to have the EA name in it rather than just "BUY ORDER"/"SELL ORDER"? It helps when running multiple EAs on an account.
Also, for the function to calculate lots, the following will work better for micro lots (0.01). You will need to create a new external variable:
"extern bool AccountIsMicro = true;"
double LotsOptimized()
{
if(mm==false) return(Lots);
double lot=Lots;
int decimalPlaces=1;
if(AccountIsMicro==true) decimalPlaces=2;
lot=NormalizeDouble(AccountFreeMargin()*TradeSizePercent/1000.0,decimalPlaces);
if(lot<0.1 && AccountIsMicro==false) lot=0.1;
if(lot<0.01 && AccountIsMicro==true) lot=0.01;
if(lot>99) lot=99;
return(lot);
}
Thanks,
Mike
Can you change the comments in the ordersend functions to have the EA name in it rather than just "BUY ORDER"/"SELL ORDER"? It helps when running multiple EAs on an account.
Also, for the function to calculate lots, the following will work better for micro lots (0.01). You will need to create a new external variable:
"extern bool AccountIsMicro = true;"
double LotsOptimized()
{
if(mm==false) return(Lots);
double lot=Lots;
int decimalPlaces=1;
if(AccountIsMicro==true) decimalPlaces=2;
lot=NormalizeDouble(AccountFreeMargin()*TradeSizePercent/1000.0,decimalPlaces);
if(lot<0.1 && AccountIsMicro==false) lot=0.1;
if(lot<0.01 && AccountIsMicro==true) lot=0.01;
if(lot>99) lot=99;
return(lot);
}
Thanks,
Mike