EA编译时没有错误,但运行时在专家栏中提示: cannot load indicator 'MACD' [4002],不知是什么原因。源代码如下,请高手给看一下:
//Macd
double Macd(string symbol,ENUM_TIMEFRAMES period,int fast,int slow,int index)
{
double buf[];
ArraySetAsSeries(buf,true);
int a=iMACD(symbol,period,0,fast,slow,STO_CLOSECLOSE);
int copied=CopyBuffer(a,0,0,index+1,buf);
return(buf[index]);
}