I need MQL4 Code converted to MQL5 code

MQL5 Convertir

Tâche terminée

Temps d'exécution 2 heures
Commentaires du client
Great developer, i will hire him again...

Spécifications


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;      
               }   
            }
         }  


Répondu

1
Développeur 1
Évaluation
(163)
Projets
258
61%
Arbitrage
4
50% / 25%
En retard
10
4%
Gratuit
2
Développeur 2
Évaluation
(590)
Projets
789
71%
Arbitrage
9
33% / 33%
En retard
22
3%
Gratuit
Publié : 8 codes
3
Développeur 3
Évaluation
(647)
Projets
1295
67%
Arbitrage
84
26% / 49%
En retard
338
26%
Gratuit
4
Développeur 4
Évaluation
(26)
Projets
23
39%
Arbitrage
26
8% / 38%
En retard
0
Gratuit

Informations sur le projet

Budget
30+ USD
Délais
de 1 à 2 jour(s)