• 注册
  • 靓号站
    • 中文
    • English
  • 注册
  • 马丁 马丁 关注:0 内容:5286

    请教高手这段代码 的意思?

  • 查看作者
  • 打赏作者
  • 马丁
  • Lv.9
    神隐会员
    靓号:1322336
    EA+

    double maxProfitPrice = 0.0;
    void posProcess(){
        int orders = OrdersTotal();
       if(orders == 0) maxProfit =0.0;
       if(orders>0){
          for(int i=orders-1;i>=0;i–){
             if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue;
             if(isBuySymbol() ){
                if(Bid>OrderStopLoss()+dTsp*pPoint /* && Bid>OrderOpenPrice() +dTsp*pPoint*/ ){
                   orderModifyTrailStop(Bid-dTsp*pPoint);
                   maxProfit = OrderProfit();
                   maxProfitPrice = Bid;
                }
                if(OrderProfit()>maxProfit && NormalizeDouble(maxProfit,Digits)>0.0){
                   maxProfit = OrderProfit();
                   maxProfitPrice = Bid;

    请登录之后再进行评论

    登录

    WordPress后台-外观-小工具 进行配置小工具

  • 发布
  • 做任务
  • 实时动态
  • 偏好设置
  • 帖子间隔 侧栏位置: