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: Mohon Bantuan Logika agar EA OP satu x 1 Pair?

  1. #1
    Anggota
    ----
     
    ason is on a distinguished road ason's Avatar
    Join Date
    Feb 2012
    Posts
    126
    Accumulated bonus
    18 USD (What is this?)
    Thanks
    6
    Thanked 14 Times in 11 Posts

    Mohon Bantuan Logika agar EA OP satu x 1 Pair?

    Mohon Bantuan Logika agar EA OP satu x 1 Pair?

    Misalkan saya menggunakan 10 pair dan hanya yg memenuhi syarat yg OP yg belum memenuhi syarat tidak OP, bagaimana caranya masta?

    saya ada potongan EA yang saya buat:

    PHP Code:

    if(Jam_trade()==1)
    {

    if(
    OrdersTotal()==Banyak_OP)
    {
           
    //+--- Open Posisi Buy ---+
           
    if(mFS30_51==OPBuy)
           {
             
    int result=OrderSend(Symbol(),OP_BUY,lot,Ask,0,Ask-StopLoss*Point,Ask+TakeProfit*Point,EAName,MagicNumber);
             
    Mulai_Jam=Henti_Jam;
             return;
           }
           
    //+--- Open Posisi Sel ---+
           
    else if(mFS30_52==OPSell)
           {
             
    int result1=OrderSend(Symbol(),OP_SELL,lot,Bid,0,Bid+StopLoss*Point,Bid-TakeProfit*Point,EAName,MagicNumber);
             
    Mulai_Jam=Henti_Jam;
             return;
           }
    }

    Bantuannya saya harapkan!


  2. <a href="https://www.showfxworld.com/id">Forex Portal MT5</a>
  3. #2
    Penggemar
    Yeehaw
     
    autoprofit is a jewel in the rough autoprofit is a jewel in the rough autoprofit is a jewel in the rough autoprofit is a jewel in the rough autoprofit's Avatar
    Join Date
    Oct 2016
    Posts
    381
    Accumulated bonus
    499 USD (What is this?)
    Thanks
    31
    Thanked 351 Times in 129 Posts
    Quote Originally Posted by ason     
    Mohon Bantuan Logika agar EA OP satu x 1 Pair?

    Misalkan saya menggunakan 10 pair dan hanya yg memenuhi syarat yg OP yg belum memenuhi syarat tidak OP, bagaimana caranya masta?

    saya ada potongan EA yang saya buat:

    PHP Code:

    if(Jam_trade()==1)
    {

    if(
    OrdersTotal()==Banyak_OP)
    {
           
    //+--- Open Posisi Buy ---+
           
    if(mFS30_51==OPBuy)
           {
             
    int result=OrderSend(Symbol(),OP_BUY,lot,Ask,0,Ask-StopLoss*Point,Ask+TakeProfit*Point,EAName,MagicNumber);
             
    Mulai_Jam=Henti_Jam;
             return;
           }
           
    //+--- Open Posisi Sel ---+
           
    else if(mFS30_52==OPSell)
           {
             
    int result1=OrderSend(Symbol(),OP_SELL,lot,Bid,0,Bid+StopLoss*Point,Bid-TakeProfit*Point,EAName,MagicNumber);
             
    Mulai_Jam=Henti_Jam;
             return;
           }
    }

    Bantuannya saya harapkan!

    Cek data history untuk pair yang akan di OP, bila data history belum data pair tersebut maka diizinkan OP.
    gitu aja gan.
    sedangkan code kamu , saya gak ngerti utk apa ada jam jam seperti itu.

    ---------- Post added at 11:04 AM ---------- Previous post was at 10:04 AM ----------

    Quote Originally Posted by ason     
    Mohon Bantuan Logika agar EA OP satu x 1 Pair?

    Misalkan saya menggunakan 10 pair dan hanya yg memenuhi syarat yg OP yg belum memenuhi syarat tidak OP, bagaimana caranya masta?

    saya ada potongan EA yang saya buat:

    PHP Code:

    if(Jam_trade()==1)
    {

    if(
    OrdersTotal()==Banyak_OP)
    {
           
    //+--- Open Posisi Buy ---+
           
    if(mFS30_51==OPBuy)
           {
             
    int result=OrderSend(Symbol(),OP_BUY,lot,Ask,0,Ask-StopLoss*Point,Ask+TakeProfit*Point,EAName,MagicNumber);
             
    Mulai_Jam=Henti_Jam;
             return;
           }
           
    //+--- Open Posisi Sel ---+
           
    else if(mFS30_52==OPSell)
           {
             
    int result1=OrderSend(Symbol(),OP_SELL,lot,Bid,0,Bid+StopLoss*Point,Bid-TakeProfit*Point,EAName,MagicNumber);
             
    Mulai_Jam=Henti_Jam;
             return;
           }
    }

    Bantuannya saya harapkan!

    bool CekHistoryOpen(){
    bool flag = true;
    int tOrderHis = OrdersHistoryTotal();
    for (int i = tOrderHis-1; i>=0; i--){
    if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)){
    if (OrderSymbol() == Symbol() && StringFind(TimeToStr(OrderOpenTime(), TIME_DATE), TimeToStr(TimeCurrent(), TIME_DATE), 0) == 0){
    flag = false;
    break;
    }
    }
    }
    return flag;
    }


    .....
    .....
    //+--- Open Posisi Buy ---+
    if(mFS30_51==OPBuy && CekHistoryOpen())
    {
    int result=OrderSend(Symbol(),OP_BUY,lot,Ask,0,Ask-StopLoss*Point,Ask+TakeProfit*Point,EAName,MagicNu mber);
    Mulai_Jam=Henti_Jam;
    return;
    }
    //+--- Open Posisi Sel ---+
    else if(mFS30_52==OPSell && CekHistoryOpen())
    {
    int result1=OrderSend(Symbol(),OP_SELL,lot,Bid,0,Bid+S topLoss*Point,Bid-TakeProfit*Point,EAName,MagicNumber);
    Mulai_Jam=Henti_Jam;
    return;
    }

    ....

    mungkin seperti ini gan,
    sorry kalo masih salah, sebab saya tidak coba di metatrade.
    Sincerely yours,
    AutoBots
    forex.autobots@gmail.com
    Create 'n Share Proven EA for Free

    Kalo suka boleh kasi Thanks

  4. #3
    Poster Honorer
    ----
     
    powerndut777 will become famous soon enough powerndut777 will become famous soon enough powerndut777's Avatar
    Join Date
    Feb 2013
    Posts
    2,077
    Accumulated bonus
    567 USD (What is this?)
    Thanks
    0
    Thanked 108 Times in 99 Posts
    selamat siang untuk open entri satu hari itu variable bagaimana ya Pak

  5. FB_indo
  6. #4
    Harian
    ----
     
    linnafx is on a distinguished road linnafx's Avatar
    Join Date
    Jul 2018
    Posts
    72
    Accumulated bonus
    0 USD (What is this?)
    Thanks
    56
    Thanked 21 Times in 29 Posts
    Quote Originally Posted by autoprofit     
    Cek data history untuk pair yang akan di OP, bila data history belum data pair tersebut maka diizinkan OP.
    gitu aja gan.
    sedangkan code kamu , saya gak ngerti utk apa ada jam jam seperti itu.

    ---------- Post added at 11:04 AM ---------- Previous post was at 10:04 AM ----------



    bool CekHistoryOpen(){
    bool flag = true;
    int tOrderHis = OrdersHistoryTotal();
    for (int i = tOrderHis-1; i>=0; i--){
    if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)){
    if (OrderSymbol() == Symbol() && StringFind(TimeToStr(OrderOpenTime(), TIME_DATE), TimeToStr(TimeCurrent(), TIME_DATE), 0) == 0){
    flag = false;
    break;
    }
    }
    }
    return flag;
    }


    .....
    .....
    //+--- Open Posisi Buy ---+
    if(mFS30_51==OPBuy && CekHistoryOpen())
    {
    int result=OrderSend(Symbol(),OP_BUY,lot,Ask,0,Ask-StopLoss*Point,Ask+TakeProfit*Point,EAName,MagicNu mber);
    Mulai_Jam=Henti_Jam;
    return;
    }
    //+--- Open Posisi Sel ---+
    else if(mFS30_52==OPSell && CekHistoryOpen())
    {
    int result1=OrderSend(Symbol(),OP_SELL,lot,Bid,0,Bid+S topLoss*Point,Bid-TakeProfit*Point,EAName,MagicNumber);
    Mulai_Jam=Henti_Jam;
    return;
    }

    ....

    mungkin seperti ini gan,
    sorry kalo masih salah, sebab saya tidak coba di metatrade.
    Bro Ason, coba kasih yang komplit koding nya, mungkin banyak master koding yang memberi masukan, kalo sepotong bingung juga programnya untuk apa gitu...thank

Posting Permissions

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