首页
短网址 ea.dog
数据
集锦
交易员热榜
VIP
休闲
✓
使用“Bing”搜索
✓
使用“Google”搜索
✓
使用“百度”搜索(推荐)
✓
使用“搜狗”搜索
✓
站内搜索
注册登陆
财经日历
市场快讯
实时波动
投机情绪
大盘云图
今日热点
世界时间
俄罗斯方块
五子棋
坦克大战
星际战争
更多
每日壁纸
运动下吧
坦克
外汇ea之家
»
节点
›
外汇指标区
›
mql4编程中文手册
›
统计持仓订单的多空单数量及总数量
赞
评论
收藏
分享
统计持仓订单的多空单数量及总数量
老周
|
3127 人阅读
|
0 人评论
|
2017-03-21
函数统计持仓订单的多空单数量及总数量。
int CheckOpenPositions()
{
int cnt, total, NumPositions;
int NumBuyTrades, NumSellTrades; // Number of buy and sell trades in this symbol
NumBuyTrades = 0;
NumSellTrades = 0;
total=OrdersTotal();
for(cnt=0;cnt<TOTAL;CNT++)
{
OrderSelect (cnt, SELECT_BY_POS, MODE_TRADES);
if ( OrderSymbol() != Symbol()) continue;
if ( OrderMagicNumber() != MagicNumber) continue;
if(OrderType() == OP_BUY ) NumBuyTrades++;
if(OrderType() == OP_SELL ) NumSellTrades++;
}
NumPositions = NumBuyTrades + NumSellTrades;
return (NumPositions);
}
复制代码
""
打赏
还没有人打赏,支持一下
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
千斤顶
显身卡
高级模式
您需要登录后才可以回帖
登录
|
注册
QQ登录
微信登录
发表评论
EA之家评论守则
VIP专享
更多
NO
1
Gap Pro EA 外汇跳空策略ea
NO
2
真正可以用的Reversal Diamond指标,没有未
NO
3
Amazing 8.2 EA , Amazing9.0 EA
NO
4
The Matrix Mind AI MT4 实盘ea 3周313%
NO
5
EXODUS 交易系统,100%没有未来函数
NO
6
Rapid Algo Fibonacci Scalper 高盈利的剥
NO
7
AITrendBooster MT4趋势跟踪策略的剥头皮ea
NO
8
Prado 8.2 安全的美日货币对ea
老周
发表主题