I need MQL4 Code converted to MQL5 code

MQL5 Dönüştürme

İş tamamlandı

Tamamlanma süresi: 2 saat
Müşteri tarafından geri bildirim
Great developer, i will hire him again...

İş Gereklilikleri


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


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(163)
Projeler
258
61%
Arabuluculuk
4
50% / 25%
Süresi dolmuş
10
4%
Serbest
2
Geliştirici 2
Derecelendirme
(590)
Projeler
789
71%
Arabuluculuk
9
33% / 33%
Süresi dolmuş
22
3%
Serbest
Yayınlandı: 8 kod
3
Geliştirici 3
Derecelendirme
(647)
Projeler
1295
67%
Arabuluculuk
84
26% / 49%
Süresi dolmuş
338
26%
Serbest
4
Geliştirici 4
Derecelendirme
(26)
Projeler
23
39%
Arabuluculuk
26
8% / 38%
Süresi dolmuş
0
Serbest

Proje bilgisi

Bütçe
30+ USD
Son teslim tarihi
from 1 to 2 gün