什么情况啊,还是不对,哪里的问题?
- int OnStart()
- {
- double aa1,aa2,aa3,aa4,open,close,open1,open2,open3,close1,close2,close3;
- for(int i=0;i<5000;i++)
- {
- MABuffer[i]=iMA(Symbol(),0,MA,0,method,PRICE_CLOSE,i);
-
- aa1=iMA(Symbol(),0,MA,0,method,PRICE_CLOSE,i);
- aa2=iMA(Symbol(),0,MA,0,method,PRICE_CLOSE,i+1);
- aa3=iMA(Symbol(),0,MA,0,method,PRICE_CLOSE,i+2);
- aa4=iMA(Symbol(),0,MA,0,method,PRICE_CLOSE,i+3);
-
- open1 = iOpen(Symbol(),0,i);
- close2 = iClose(Symbol(),0,i);
- open2 = iOpen(Symbol(),0,i+1);
- close2 = iClose(Symbol(),0,i+1);
- open3 = iOpen(Symbol(),0,i+2);
- close3 = iClose(Symbol(),0,i+2);
- open4 = iOpen(Symbol(),0,i+3);
- close4 = iClose(Symbol(),0,i+3);
-
- if(open2<close2 && open2>aa2 && open3<close3 && open3> aa3 && open4<close4 && close4>(aa4+5*Point) && open4<(aa4-5*Point)){
- UPBuffer[i] = Low[i]-100*Point;
- }
-
- if(open2>close2 && open2<aa2 && open3>close3 && open3< aa3 && open4>close4 && close4<(aa4-5*Point) && open4>(aa4+5*Point)){
- DOWNBuffer[i] = High[i]+100*Point;
- }
-
- }
-
-
-
- return(0);
- }
复制代码 |