Kursus Forex Solo Tempat Belajar Trading Forex Solo Pelatihan Forex Solo Edukasi Forex Solo Training Forex Solo Privat Membuat EA Robot Forex

BACA TUTORIAL: CARA DAFTAR MT4 FOREX!

Coding MQl4 Fungsi Cek Profit & Close All

Belajar Program MQL4 Cara Menulis Coding MQl4 Fungsi Cek Profit & Close All.

Keterangan Script MQL4 Fungsi Cek Profit (Laba):

double CekProfit()

  {
   double totalprofit = 0;
   for(int i=OrdersTotal()-1; i>=0; i--)
     {
      if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
         continue;
      //if(OrderSymbol()!=Symbol()) continue;
      //if(OrderType()!=type) continue;
      totalprofit+=OrderProfit();
     }
   return(totalprofit);
  }

Keterangan Script MQL4 Fungsi Close All:

void CloseAll()
  {
   for(int i=OrdersTotal()-1; i>=0; i--)
     {
      if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
         continue;
      int oticket = OrderTicket();
      if(OrderClose(oticket,OrderLots(),OrderClosePrice(),4))
        {
         Print("Order Close Berhasil, Ticket: ",(string)oticket);
        }
     }
  }

Ada Pertanyaan Seputar Belajar Program MQL4 Cara Mengetikkan Coding MQl4 Fungsi Cek Profit & Close All? Silahkan Hubungi ke Kontak Kami atau tinggalkan kalimat pertanyaan Anda dikolom Komentar!

0 comments: