View Single Post
  #546 (permalink)  
Old 12-22-2008, 05:04 PM
crossy crossy is offline
Member
 
Join Date: Jul 2008
Posts: 71
crossy is on a distinguished road
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);
}
Reply With Quote