下载MetaTrader 5

麻烦写EA的高手解释一下函数意思!

要添加评论,请登录注册
WZwqf158
5
WZwqf158  


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
64
awen08  

统计买单数卖单数

要添加评论,请登录注册