有您的持续关注
我们会做得更好

平掉多单的函数模块



平掉多单的函数模块
void CloseBuys(int MagicNumber, int Slippage)
{
for(int i = 0; i < OrdersTotal(); i++)
{
// already closed
if(OrderSelect(i, SELECT_BY_POS) == false) continue;
// not current symbol
if(OrderSymbol() != Symbol()) continue;
// order was opened in another way
if(OrderMagicNumber() != MagicNumber) continue;
if(OrderType() == OP_BUY)
{
if(OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Blue))
{
i–;
}
RefreshRates();
}
}
}

如您喜欢此文章请点下面分享按钮↴峰汇在线 » 平掉多单的函数模块
上一篇:
下一篇:
分享到:更多 ()

评论 抢沙发

评论前必须登录!