这些天依葫芦画瓢写了个EA,写完之后,发现不能测试,也不能交易,自己检查了好多遍,也找不出什么问题,请各位帮忙看看,帮忙指出那里错了。。谢谢了
int start()
{
double MacdCurrentzhu, MacdPreviouszhu, SignalCurrent;
double SignalPrevious;
int cnt, ticket=OrderTicket(), total;
MacdCurrentzhu=iMACD(Symbol(),PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
MacdPreviouszhu=iMACD(Symbol(),PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_MAIN,1);
SignalCurrent=iMACD(Symbol(),PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
SignalPrevious=iMACD(Symbol(),PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1);
int com=0;
for(int i=0;i0&&MacdCurrentzhu>=SignalCurrent&&MacdPreviouszhu>0&&MacdPreviouszhu>=SignalPrevious)
{
ticket=OrderSend(Symbol(),OP_BUY,0.1,Ask,20,Ask-500*Point,Ask+1500*Point,\"buy\",11,0,Green);
if(ticket>0)
{
Print(\"多单下单成功:\",OrderTicket());
}
else
Print(\"多单下单失败: \",GetLastError());
return(0);
}
if(MacdCurrentzhu |