计算最后一张空单的成交价格的函数模块的写法
计算最后一张空单的成交价格的函数模块的又一写法: double FindLastSellPrice() { double oldorderopenprice=0, orderprice; int cnt, oldticketnumber=0, ticketnumber; for(cnt=OrdersTotal()-1;cnt>=0;cnt–) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if(OrderSymbol()!=Symbol()||OrderMagicNumber()!=MagicNumber) continue; if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && OrderType()==OP_SELL) { ticketnumber=OrderTicket(); if(ticketnumber>oldticketnumber) { orderprice=OrderOpenPrice(); oldorderopenprice=orderprice; oldticketnumber=ticketnumber; } } } return(orderprice); } |
打赏
最新创建圈子
- 新闻EA运行效果图圈 2019-05-05
圈主:admin 帖子:1