Carles91 escribió:Éstos son los errores:
"double" - variable expected
"LotBuy" - variable not defined
"double" - variable expected
"PipsSLBuy" - variable not defined
"double" - variable expected
"TPBuy" - variable not defined
"LotBuy" - variable not defined
"PipsSLBuy" - variable not defined
"PipsSLBuy" - variable not defined
"TPBuy" - variable not defined
"PipsSLBuy" - variable not defined
"LotBuy" - variable not defined
"TPBuy" - variable not defined
Y éste el EA:
int start()
{
double spread,
double LotBuy <<<<<<<FALTA UNA COMA y otra cosa, si vas a separarlos con comas imagino que solo necesitas el primer double... si los separas con ; necesitas el double en cada variable...
double LotSell,
double PipsSLBuy,
double PipsSLSell,
double TPBuy,
double TPSell;
spread=Ask-Bid <<<<<FALTA ;
LotBuy=((AccountBalance()*0.02)/PipsSLBuy)/10 <<<<<FALTA ;
LotSell=((AccountBalance()*0.02)/PipsSLSell)/10 <<<<<FALTA ;
PipsSLBuy=(Close[1]-Low[1])*10000 <<<<<FALTA ;
PipsSLSell=(High[1]-Close[1])*10000 <<<<<FALTA ;
TPBuy=Close[1]+(PipsSLBuy/10000)+spread <<<<<FALTA ;
TPSell=Close[1]-(PipsSLSell/10000)-spread <<<<<FALTA ;
int
ticketbuy,
ticketsell;
//----------------------------------------------------------------------------------------------
if (iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0)>0 && Open[2]>Close[2] && Low[1]<Low[2] && Close[1]>High[2])
{
ticketbuy=OrderSend(Symbol(),OP_BUY,LotBuy,Ask,3,Low[1],TPBuy,"Shadow Buy",1111,0,Green);
if (ticketbuy<0)
{
Print("OrderSend failed with error #",GetLastError());
return(0);
}
}
//----------------------------------------------------------------------------------------------
if (iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0)<0 && Open[2]<Close[2] && High[1]>High[2] && Close[1]<Low[2])
{
ticketsell=OrderSend (Symbol(),OP_SELL,LotSell,Bid,3,High[1],TPSell,"Shadow Sell",2222,0,Red);
if (ticketsell<0)
{
Print("OrderSend failed with error #",GetLastError());
return(0);
}
}
return(0);
}
mira a ver si asi se te quitan algunos, y pon los que queden...