下载MetaTrader 5
要添加评论,请登录注册
启用MQL5存储来存储您的源代码。这是免费的!
glennking
87
glennking 2009.10.19 14:20 

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);

}

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

hujeo
81
hujeo 2009.10.19 14:42  

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

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

loh yoke wah
33
loh yoke wah 2009.10.23 17:51  
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);
}


}

/
要添加评论,请登录注册