|
Standart or MINI account
hello freinds,
First for Holger, Don't worry, you have an insurence for that, and
i'm happy that it was coucht fast enough.
second, I need help, I'm was using MINI account and the EA
worked nice, but now I'm checking a new broker, which workes
with only Standarts accounts. I got an error (131) "the order volume is bad".
I think that there is a problem with the following function, which is a part
of v1E.
Can someone help me, Thankes
double GetLots()
{
double lots,MD,RM,FMM,MinLots,LotSize; int lotsdigit;
LotSize = MarketInfo(Symbol(), MODE_LOTSIZE);
MD = NormalizeDouble(MarketInfo(Symbol(), MODE_LOTSTEP), 2);
RM = NormalizeDouble(MarketInfo(Symbol(), MODE_MARGINREQUIRED), 4);
FMM = (RM+5)*100;
if(LotsDigit==0)
{
if (MD==0.01) lotsdigit=2;
else lotsdigit=1;
LotsDigit=lotsdigit;
}
if (MM==true) lots = NormalizeDouble((AccountFreeMargin()*Risk/LotSize)/MaxTrades,LotsDigit);
else lots=Lots;
MinLots=NormalizeDouble(MarketInfo(Symbol(),MODE_M INLOT),2);
if (lots < MinLots) lots = MinLots;
if (lots > MaxLots) lots = MaxLots;
return (lots);
}
|