会连续出现单子,为什么?如何只出现一个单子?

 

没有条件判断阿,当然进入start就ordersend了

另外,start这个里面放function, 不建议直接放ordersend.

 
plglenn 写道 >>

int start()
{


OrderSend(Symbol(), OP_BUYSTOP, _number, Bid + _pendingPoint * Point, 0, Bid + _pendingPoint * Point - _lossPoint * Point, Bid + _pendingPoint * Point + _getPoint * Point, "some comment", 16384, 0, Green);

}

会连续出现单子,为什么?如何只出现一个单子?
if(total<1)

int start()
{
int total=OrdersTotal();
if(total<1)

{
OrderSend(Symbol(), OP_BUYSTOP, _number, Bid + _pendingPoint * Point, 0, Bid + _pendingPoint * Point - _lossPoint * Point, Bid + _pendingPoint * Point + _getPoint * Point, "some comment", 16384, 0, Green);
}


}

原因: