error de programacion
Publicado por adriandd (1 intervención) el 21/12/2017 16:50:47
Hola,
Me da el error 'int' -semicolon expected, espero que alguien me pueda echar una mano. Gracias
extern bool MM = TRUE;
extern double Risk = 2;
extern double Lots = 0.1;
extern double LotDigits =2;
double GetLots()
int init()
{
double minlot = MarketInfo(Symbol(), MODE_MINLOT);
double maxlot = MarketInfo(Symbol(), MODE_MAXLOT);
double leverage = AccountLeverage();
double lotsize = MarketInfo(Symbol(), MODE_LOTSIZE);
double stoplevel = MarketInfo(Symbol(), MODE_STOPLEVEL);
double MinLots = 0.01; double MaximalLots = 50.0;
if(MM)
{
double lots = Lots;
double Lots = NormalizeDouble(AccountFreeMargin() * Risk/100 / 1000.0, LotDigits);
if(Lots < minlot) lots = minlot;
if (Lots > MaximalLots) lots = MaximalLots;
if (AccountFreeMargin() < Ask * lots * lotsize / leverage) {
}}
else Lots=NormalizeDouble(Lots,Digits);
return(Lots);
}
//+------------------------------------------------------------------+
Me da el error 'int' -semicolon expected, espero que alguien me pueda echar una mano. Gracias
extern bool MM = TRUE;
extern double Risk = 2;
extern double Lots = 0.1;
extern double LotDigits =2;
double GetLots()
int init()
{
double minlot = MarketInfo(Symbol(), MODE_MINLOT);
double maxlot = MarketInfo(Symbol(), MODE_MAXLOT);
double leverage = AccountLeverage();
double lotsize = MarketInfo(Symbol(), MODE_LOTSIZE);
double stoplevel = MarketInfo(Symbol(), MODE_STOPLEVEL);
double MinLots = 0.01; double MaximalLots = 50.0;
if(MM)
{
double lots = Lots;
double Lots = NormalizeDouble(AccountFreeMargin() * Risk/100 / 1000.0, LotDigits);
if(Lots < minlot) lots = minlot;
if (Lots > MaximalLots) lots = MaximalLots;
if (AccountFreeMargin() < Ask * lots * lotsize / leverage) {
}}
else Lots=NormalizeDouble(Lots,Digits);
return(Lots);
}
//+------------------------------------------------------------------+
Valora esta pregunta


0