请教高手帮助修改 加载无任何反应

 

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
extern int 变色均线=18;
double duo[],aspect[],stopprice1,aspect1;
double kong[],stopprice[],stopnum;
int init()
{
SetIndexBuffer(0,aspect1);
SetIndexBuffer(1,stopprice1);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexDrawBegin(0,变色均线);
SetIndexDrawBegin(1,变色均线);
IndicatorDigits(Digits);
return(0);
}
int start()

{

double temp0,temp1;
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
aspect[Bars-1] =0;
stopnum =.02;
stopprice[Bars-1] =0;
if (limit ==Bars-1)

//多头处理
for(int i=limit; Low[i] <= stopprice[i]; i--)

//多反空
{aspect[i]= 1;
stopprice[i]= High[i]+stopnum;}

if (Low[i] - stopnum > stopprice[i])
{ stopprice[i] = Low[i]-stopnum;}

else
{
if (High[i] >= stopprice[i])

//空头处理


//空反多
{ aspect[i]= 0;
stopprice[i] = Low[i]-stopnum;}


//处理移动的底部
if (High[i] + stopnum < stopprice[i])
{stopprice[i] = High[i]+stopnum;}

}
stopprice1=stopprice[i];

return(0);
}

 

你的这个是什么意思?

1SetIndexBuffer(0,aspect1);
SetIndexBuffer(1,stopprice1);

aspect1, stopprice1 都必须是数组。你定义的不是

2.limit ==Bars-1 永远不相等。画不出图来