下载MetaTrader 5
要添加评论,请登录注册
有代码问题吗?在文档中找出解决方法!
WZwqf158
5
WZwqf158 2011.03.05 07:39 


extern int tp = 65;赢利点的间距
extern int sh = 41;交易放置水平的间距
//----
datetime lastt;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int kol_buy()
{
int kol_ob = 0;
//----
for(int i = 0; i < OrdersTotal(); i++)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == false)
break;
//----
if(OrderType() == OP_BUY)
kol_ob++;
}
return(kol_ob);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int kol_sell()
{
int kol_os = 0;
//----
for(int i = 0; i < OrdersTotal(); i++)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == false)
break;
//----
if(OrderType() == OP_SELL)
kol_os++;
}
return(kol_os);
}
//+------------------------------------------------------------------+

awen08
67
awen08 2011.09.14 21:51  

统计买单数卖单数

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