OrderSend(Symbol(),OP_BUY,0.1,Ask,30,Ask-300*Point,Ask+300*Point,"buy",1,0,clrWhite);
做 compile 時會出現以下訊息
return value of 'OrderSend' should be checked
改成
int tick = OrderSend(Symbol(),OP_BUY,0.1,Ask,30,Ask-300*Point,Ask+300*Point,"buy",1,0,clrWhite);
if( tick<0 b="">0>
{
Print("OrderSend failed with error #",GetLastError());
}
就OK了!!
這一段是用來查錯誤的。
if( tick<0 b="">0>
{
Print("OrderSend failed with error #",GetLastError());
}
沒有留言:
張貼留言