Forex Community Place

Dapatkan hingga
$50000
karena mengundang teman
untuk memperoleh Bonus StartUp
dari InstaForex
Tidak perlu investasi!
Dapatkan bonus
55%
ke akun anda!
Results 1 to 4 of 4

Thread: [HELP] Menambahkan Coding BreakEven dalam EA

  1. #1 Collapse Post
    Orang Asing
    ----
     
    adamshima21 is on a distinguished road adamshima21's Avatar
    Join Date
    Apr 2012
    Posts
    13
    Accrued Payments
    2 USD (What is this?)
    Thanks
    0
    Thanked 15 Times in 6 Posts
    SubscribeSubscribe
    Subscribed: 0

    [HELP] Menambahkan Coding BreakEven dalam EA

    Mohon Bantuan Logika menambahkan Breakeven dalam EA

    misalkan saya menggunakan sistem martiangel dan ketika op sudah level max maka tidak lagi menggunakan tp (pip) melainkan breakeven (breakeventrade)

    Though trading on financial markets entails high risk, still it can generate extra income on condition that you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  2. <a href="https://www.mt5.com/id/">Forex Portal MT5</a>
  3. #2 Collapse Post
    Orang Asing
    ----
     
    prakosd is on a distinguished road prakosd's Avatar
    Join Date
    Sep 2014
    Location
    Jakarta
    Posts
    17
    Accrued Payments
    1 USD (What is this?)
    Thanks
    16
    Thanked 41 Times in 7 Posts
    SubscribeSubscribe
    Subscribed: 0
    Hallo @adamshima21,

    Biasanya saya menggunakan

    Code:
    //Menggambil status profit atau loss
    double currentProfit=NormalizeDouble(AccountEquity()-AccountBalance(),2);
    
    //Jika profit sudah break even (atau 0) atau lebih besar
    if(currentProfit>=0)
    {
    tiket.closeAllOrder(); //untuk menutup semua open posisi
    }
    Semoga terbantu.

    salam,
    Danang Prakoso
    Last edited by prakosd; 02-25-2018 at 14:01. Reason: kepencet save

  4. #3 Collapse Post
    Orang Asing
    ----
     
    heyi is an unknown quantity at this point heyi's Avatar
    Join Date
    Feb 2016
    Posts
    2
    Accrued Payments
    0 USD (What is this?)
    Thanks
    0
    Thanked 0 Times in 0 Posts
    SubscribeSubscribe
    Subscribed: 0
    Quote Originally Posted by prakosd     
    Hallo @adamshima21,

    Biasanya saya menggunakan

    Code:
    //Menggambil status profit atau loss
    double currentProfit=NormalizeDouble(AccountEquity()-AccountBalance(),2);
    
    //Jika profit sudah break even (atau 0) atau lebih besar
    if(currentProfit>=0)
    {
    tiket.closeAllOrder(); //untuk menutup semua open posisi
    }
    Semoga terbantu.

    salam,
    Danang Prakoso
    Suhu, kalau case nya sperti ini :

    Fitur BEP bisa di ON/OFF kan. Dan Fitur BEP memulai jika open position sudah mencapai jumlah tertentu "X" open posisi. Misalnya, sudah ada Open Posisi sebanyak 10, jadi fitur BEP yang ON. Tidak mengejar TP.

    Terimakasih suhu

    Though trading on financial markets entails high risk, still it can generate extra income on condition that you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  5. #4 Collapse Post
    Orang Lama
    Semilir
     
    amtwoxtwo is a name known to all amtwoxtwo is a name known to all amtwoxtwo is a name known to all amtwoxtwo is a name known to all amtwoxtwo is a name known to all amtwoxtwo is a name known to all amtwoxtwo's Avatar
    Join Date
    Sep 2010
    Location
    Sekitaran Bumi
    Posts
    1,057
    Accrued Payments
    140 USD (What is this?)
    Thanks
    96
    Thanked 619 Times in 314 Posts
    SubscribeSubscribe
    Subscribed: 0
    Quote Originally Posted by prakosd     
    Hallo @adamshima21,

    Biasanya saya menggunakan

    Code:
    //Menggambil status profit atau loss
    double currentProfit=NormalizeDouble(AccountEquity()-AccountBalance(),2);
    
    //Jika profit sudah break even (atau 0) atau lebih besar
    if(currentProfit>=0)
    {
    tiket.closeAllOrder(); //untuk menutup semua open posisi
    }
    Semoga terbantu.

    salam,
    Danang Prakoso
    seperti yg disebutkan. hal tersebut berlaku JIKA account tsb tidak ada intervensi dari EA atau strategi lain.
    jika mau BEP mandiri TANPA mengganggu order lain.
    Code:
    input int MagicNumber = 11111;
    di isi dibagian atas agar bisa dirubah rubah

    Code:
    double profitB=-1, profitS=-1;
    for (int a = 0; a < OrdersTotal(); a++)
       {
          if(OrderSelect(a, SELECT_BY_POS,MODE_TRADES) == true)
          { 
             if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber && OrderCloseTime() == 0) 
             {
                   if(OrderType() == OP_BUY)  {ProfitB+=OrderProfit() + OrderCommission() + OrderSwap();} 
                   if(OrderType() == OP_SELL) {ProfitS+=OrderProfit() + OrderCommission() + OrderSwap();}
             } 
          }
       }
    
    if(ProfitB >0 || ProfitS >0){Perintah Close Order;}
    Yahuuu

Please read recommendations on how to write popular and useful posts in the Contest of the Best Answers Please read recommendations on how to write popular and useful posts in the Best Content Contest

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts