请各位高手看看为什么不开仓?

 
#define MAGICMA 20131111 int CalculateCurrentOrders(string symbol) { int buys=0,sells=0; //---- for(int i=0;i0) return(buys); else return(-sells); } void CheckForOpen() { double amt1,amt2,bmt1,bmt2; int res; if(Volume[0]>1) return; amt1=iMA(NULL,0,4,0,MODE_SMA,PRICE_CLOSE,0); amt2=iMA(NULL,0,4,0,MODE_SMA,PRICE_CLOSE,1); bmt1=iMA(NULL,0,12,0,MODE_SMA,PRICE_CLOSE,0); bmt2=iMA(NULL,0,12,0,MODE_SMA,PRICE_CLOSE,1); if(amt2>bmt2 && amt1<=bmt1)//黄线下穿紫线(卖出) { res=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,"",MAGICMA,0,Red); return; } } void OnTick() { if(Bars
 
第一条线下穿第二条线时卖出,就是不开仓。
原因: