我認為這是不對的,
可以這樣寫,Print("i= ",I," order number = ",order ticket());
//妳可以用這個來平倉。
if(order type()= = OP _ BUY)order close(order ticket(),OrderLots(),Bid,3,Blue);
if(order type()= = OP _ SELL)order close(order ticket(),OrderLots(),Ask,3,Red);