最近成交的订单的手数获取方法
最近成交的订单的手数获取方法
double LastBuyLots;
double LastSellLots;
for(int cnt=OrdersTotal()-1;cnt cnt--){
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()!=Symbol()||OrderMagicNumber()!=MagicNumber)continue;
if(OrderSymbol()==Symbol() OrderMagicNumber()==MagicNumber)
if(OrderType()==OP_BUY)
{
LastBuyLots=OrderLots();
break;
}
if(OrderSymbol()==Symbol() OrderMagicNumber()==MagicNumber)
if(OrderType()==OP_SELL)
{
LastSellLots=OrderLots();
break;
}
}复制代码
double LastBuyLots;
double LastSellLots;
for(int cnt=OrdersTotal()-1;cnt cnt--){
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()!=Symbol()||OrderMagicNumber()!=MagicNumber)continue;
if(OrderSymbol()==Symbol() OrderMagicNumber()==MagicNumber)
if(OrderType()==OP_BUY)
{
LastBuyLots=OrderLots();
break;
}
if(OrderSymbol()==Symbol() OrderMagicNumber()==MagicNumber)
if(OrderType()==OP_SELL)
{
LastSellLots=OrderLots();
break;
}
}复制代码
打赏
最新创建圈子
- 新闻EA运行效果图圈 2020-01-01
圈主:admin 帖子:1