I need MQL4 Code converted to MQL5 code

MQL5 转化中

工作已完成

执行时间2 小时
客户反馈
Great developer, i will hire him again...

指定


I Need to convert MQL4 code to MQL5. Make it is working as same as MT4 do.  It is small Code I need this today. Code is Below -


 datetime start_date = TimeCurrent()-1000;
      
         double lots1,prices,prices_c,swap,pricesBuy,lotsbuy,pricesSell,lotssell;

         for (int i=OrdersHistoryTotal()-1; i>=0; i--)
         {
            if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))
            {
               if (OrderSymbol() == _Symbol && (OrderType() == OP_SELL || OrderType() == OP_BUY) && doMagic() && OrderCloseTime()!=0)
               {
                  if ( OrderCloseTime() >= start_date) 
                  { 
                     lots1 = lots1 + OrderLots();
                     prices = prices + (OrderOpenPrice() * OrderLots());
                     prices_c = prices_c + (OrderOpenPrice() * OrderLots());
                     swap = swap + OrderSwap();  
               
                     if(OrderType()==OP_BUY){
                        pricesBuy = pricesBuy + (OrderOpenPrice() * OrderLots());
                        lotsbuy = lotsbuy + OrderLots();
                     }
                     else if(OrderType()==OP_SELL){
                        pricesSell = pricesSell + (OrderOpenPrice() * OrderLots());
                        lotssell = lotssell + OrderOpenPrice();
                     }
                  }
                  
                  if ( OrderCloseTime() < start_date) break;      
               }   
            }
         }  


反馈

1
开发者 1
等级
(163)
项目
258
61%
仲裁
4
50% / 25%
逾期
10
4%
空闲
2
开发者 2
等级
(590)
项目
789
71%
仲裁
9
33% / 33%
逾期
22
3%
空闲
发布者: 8 代码
3
开发者 3
等级
(647)
项目
1295
67%
仲裁
84
26% / 49%
逾期
338
26%
空闲
4
开发者 4
等级
(26)
项目
23
39%
仲裁
26
8% / 38%
逾期
0
空闲

项目信息

预算
30+ USD
截止日期
 1  2 天