New York 11:13 PM London 4:13 AM Tokyo 12:13 PM Sydney 1:13 PM
                  Online: 1548    Threads: 54,873    Posts: 1,596,040 Members: 7,212  FXO Forum Shares: We Buy $1.318 | We Sell $1.3588
 
Page 1 of 13 1234511 ... LastLast
Results 1 to 15 of 193
  1. #1
    Elder Analyst chandrawg's Avatar
    Join Date
    May 2008
    Location
    Indonesia
    Posts
    602
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Belajar Membuat EA martingale Super

    Di Thread ini akan saya coba berbagi proses saya belajar membuat ea martingale dari awal.
    Jadi rekan rekan yg dah mahir bisa kasih masukan sehingga bisa tercipta ea martingale yg ga pernah K.O . soalnya sudah banyak beredar ea martingale yg saat sideway profitnya cepat banget tapi saat pair bergerak aktif malah K.O

    Mudah2an banyak master2 disini yg mau membantu.
    Last edited by chandrawg; 11-03-2008 at 04:20 AM.
    Prepaid Card ~ Harga Murah dan layanan cepat
    JogjaFX ~ Bonus lebih dari 50 usd / bulan
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  2. #2
    Elder Analyst chandrawg's Avatar
    Join Date
    May 2008
    Location
    Indonesia
    Posts
    602
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Cara Kerja

    -entry Buy :
    1. jika tidak ada order
    2. Jika harga berada di atas SMMA 16

    -entry Sell
    1. Jika tidak ada order
    2. Jika harga berada di bawah SMMA 16

    -Double Lot Buy
    1. Jika Order Terakhir adalah Buy dan harga sama dengan harga open order terakhir - 20 point

    -Double Lot Sell
    1. Jika Order Terakhir adalah Sell dan Harga sama dengan harga open order terakhir +20 point

    -Locking Buy
    1. Jika order terakhir adalah Sell dan harga = Harga Open order terakhir + 20 point & harga berada di atas SMMA 16

    -Locking Sell
    2. Jika order terakhir adalah Buy dan harga = harga open order terakhir -20 point & harga berada di bawah SMMA 16

    -Close Semua Buy
    1 jika order Buy terakhir menyentuh TP

    -Close Semua Sell
    1. Jika order Sell Terakhir menyentuh TP
    Prepaid Card ~ Harga Murah dan layanan cepat
    JogjaFX ~ Bonus lebih dari 50 usd / bulan
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  3. #3
    Elder Analyst chandrawg's Avatar
    Join Date
    May 2008
    Location
    Indonesia
    Posts
    602
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ini adalah script kasar sementara. ayo buat para master kasih kritik dan sarannya donk
    Code:
    #property copyright "Chandra Wiharja"
    #property link      "http://www.chandrawiharja.com"
    int start()
    {
       double pivot=iMA(NULL,1,16,0,MODE_SMMA,0,0);
       int total=OrdersTotal(),i,range=20,sl=0,slippage=10;
       if (total<1)
          {
          if (Ask>pivot) OrderSend(Symbol(),OP_BUY,0.1,Ask,0,0,Ask+range*Point,"Order Buy 1",11111,0,Blue);
          if (Ask<pivot) OrderSend(Symbol(),OP_SELL,0.1,Bid,0,0,Bid-range*Point,"Order Sell 1",11111,0,Red);
          }
       else
          {
             OrderSelect(total-1, SELECT_BY_POS, MODE_TRADES);
             if (OrderType()==OP_BUY)
             {
             if  ((Ask+1*Point >= (OrderOpenPrice()-range*Point)) && (Ask-1*Point <= (OrderOpenPrice()-range*Point)))
                {
                   if (Ask>pivot) OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);
                   else 
                   {
                   OrderSend(Symbol(),OP_SELL,0.2,Bid,slippage,0,Bid-range*Point,"Hedging",11111,0,Red);
                   OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);               
                   }
                }
             else if ((Ask+1*Point >= (OrderOpenPrice()+range*Point)) && (Ask-1*Point <= (OrderOpenPrice()+range*Point))) closebuy();
             }
          
             if (OrderType()==OP_SELL)
             {
             if ((Bid+1*Point >= (OrderOpenPrice()+range*Point)) && (Bid-1*Point <= (OrderOpenPrice()+range*Point)))
                {
                   if (Bid<pivot) OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);
                   else 
                   {
                      OrderSend(Symbol(),OP_BUY,0.2,Ask,slippage,0,Ask+range*Point,"hedging",11111,0,Blue);
                      OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);                
                   }
                }
             else if ((Bid+1*Point >= (OrderOpenPrice()-range*Point)) && (Bid-1*Point <= (OrderOpenPrice()-range*Point))) closesell();
             }
          }   
       return(0);
    }
    void closebuy()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,5,CLR_NONE);
      }
       return(0);
    }
    void closesell()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,CLR_NONE);
      }
       return(0);
    }
    Prepaid Card ~ Harga Murah dan layanan cepat
    JogjaFX ~ Bonus lebih dari 50 usd / bulan
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  4. #4
    Elder Analyst
    Join Date
    Apr 2008
    Posts
    933
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sy masih trauma ama martingale
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  5. #5
    In Profit ef2122's Avatar
    Join Date
    Oct 2008
    Posts
    109
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ijin sedot bro.... Aku juga masih belajar MQL. http://forum.fxopen.com/showthread.php?t=39598
    IMHO, klo OP-nya tepat gak bakalan kandas deh.... dilipet2 berapapun malah semakin untung. Bagaimana senior trader....?
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  6. #6
    In Profit Megashop's Avatar
    Join Date
    Feb 2008
    Posts
    213
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by ef2122 View Post
    Ijin sedot bro.... Aku juga masih belajar MQL. http://forum.fxopen.com/showthread.php?t=39598
    IMHO, klo OP-nya tepat gak bakalan kandas deh.... dilipet2 berapapun malah semakin untung. Bagaimana senior trader....?
    hehehe seandainya bisa op selalu tepat ... masalahnya kan ga ada sistem yang 100% sempurna .. market totally unpredictable.
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  7. #7
    Elder Analyst chandrawg's Avatar
    Join Date
    May 2008
    Location
    Indonesia
    Posts
    602
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Untuk itu mari kita sama-sama membangung EA yg super profit . karena itu kalau rekan2 ada ide misalnya di tambahin indikator apa untuk menentukan entrynya. di atas saya hanya memakai SMMA 16 untuk batas sell dan buy. mudah2an disini rekan-rekan mau bangun ea ini bersama, jangan seperti di beberapa forum sebelumnya. saya kasih rangkanya lalu di copy trus dikembangkan sendiri lalu dijual
    Last edited by chandrawg; 11-03-2008 at 11:26 AM.
    Prepaid Card ~ Harga Murah dan layanan cepat
    JogjaFX ~ Bonus lebih dari 50 usd / bulan
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  8. #8
    Elder Analyst chandrawg's Avatar
    Join Date
    May 2008
    Location
    Indonesia
    Posts
    602
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ini adalah hasil backtest 1 bulan terakhir.
    dari hasil itu bisa kita lihat beberapa kali terancam MC. sampai2 EA nya pernah buka posisi sampai 12.8 lot . saya pikir itu karena EA nya melakukan locking hanya menggunakan 0.2 lot. sekarang ini saya lagi coba bagaimana caranya supaya saat order locking lot nya bisa seimbang (minusnya tidak bertambah dalam). agak sukar juga sih soalnya kalau lot nya saya samakan dengan lot terakhir berarti masih tersisa double lot order sebelumnya, berarti ga seimbang. dan kalau saya order locking lotnya sama dengan jumlah seluruh lot sebelumnya dan harga berbalik kembali berarti minusnya jadi besar . mudah2an ada master matematika disini yg mau kasih solusinya.
    Attached Files Attached Files
    Prepaid Card ~ Harga Murah dan layanan cepat
    JogjaFX ~ Bonus lebih dari 50 usd / bulan
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  9. #9
    In Profit ef2122's Avatar
    Join Date
    Oct 2008
    Posts
    109
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Halo bro Candra. Sebenarnya saya bukan orang IT, so mungkin jawaban ini bisa salah bisa benar, Hehe.
    Saya coba uthek-uthek logikanya saja jadi tanda > saya ganti < ataupun sebaliknya, cuman karena cuman trial dan error, maka lupa yang mana yang diganti. Untuk source code-nya saya kembalikan lagi...(setalah di uthek2)

    #property copyright "Chandra Wiharja"
    #property link "http://www.chandrawiharja.com"
    int start()
    {
    double pivot=iMA(NULL,1,16,0,MODE_SMMA,0,0);
    int total=OrdersTotal(),i,range=20,sl=0,slippage=10;
    if (total<1)
    {
    if (Ask<pivot) OrderSend(Symbol(),OP_BUY,0.1,Ask,0,0,Ask+range*Point,"Order Buy 1",11111,0,Blue);
    if (Ask>pivot) OrderSend(Symbol(),OP_SELL,0.1,Bid,0,0,Bid-range*Point,"Order Sell 1",11111,0,Red);
    }
    else
    {
    OrderSelect(total-1, SELECT_BY_POS, MODE_TRADES);
    if (OrderType()==OP_BUY)
    {
    if ((Ask+1*Point <= (OrderOpenPrice()-range*Point)) && (Ask-1*Point <= (OrderOpenPrice()-range*Point)))
    {
    if (Ask>pivot) OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);
    else
    {
    OrderSend(Symbol(),OP_SELL,0.2,Bid,slippage,0,Bid-range*Point,"Hedging",11111,0,Red);
    OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);
    }
    }
    else if ((Ask+1*Point >= (OrderOpenPrice()+range*Point)) && (Ask-1*Point >= (OrderOpenPrice()+range*Point))) closebuy();
    }

    if (OrderType()==OP_SELL)
    {
    if ((Bid+1*Point >= (OrderOpenPrice()+range*Point)) && (Bid-1*Point <= (OrderOpenPrice()+range*Point)))
    {
    if (Bid<pivot) OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);
    else
    {
    OrderSend(Symbol(),OP_BUY,0.2,Ask,slippage,0,Ask+range*Point,"hedging",11111,0,Blue);
    OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);
    }
    }
    else if ((Bid+1*Point >= (OrderOpenPrice()-range*Point)) && (Bid-1*Point <= (OrderOpenPrice()-range*Point))) closesell();
    }
    }
    return(0);
    }
    void closebuy()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
    {
    OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
    if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,5,CLR_NONE);
    }
    return(0);
    }
    void closesell()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
    {
    OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
    if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,CLR_NONE);
    }
    return(0);
    }

    Saya lakukan backtest juga untuk USD/JPY dengan time frame H1, cukup dengan 5000 hasilnya bisa menjadi 41.000 an, cuman untuk waktu tertentu (01 April sd 27 Juni 2008) Hasil gambarnya:

    IMHO, sebaiknya maksimum tradingnya dibatasin, biar gak sampai kemana-mana.... Dari hasil berbagai back test sampai dengan 102,4 lot bahkan ada 204,8 lot. Seandainya cuman 12.8 lot atau 25,6 lot mungkin masih bisa jalan lama lebih tahan terhadap news yang aneh-aneh.
    Bro aku tunggu source code dengan batasan maksimum trading ya. Hehe
    Attached Thumbnails Attached Thumbnails StrategyTester Chandra.jpg  
    Attached Files Attached Files
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  10. #10
    Elder Analyst chandrawg's Avatar
    Join Date
    May 2008
    Location
    Indonesia
    Posts
    602
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wah mantap hasilnya... cuma perubahan di atas kayaknya akan menyebabkan banyak bug mas. seperti order send pertama kata point nya di pisah itu menyebabkan tidak bisa order buy awal, trus kalau di balik order buy saat harga berada di bawah SMMA 16 dan sebaliknya. itu tidak akan pernah terjadi locking, sampai itu ordernya sangat besar sekali bisa mencapai 204 lot . karena dia akan terus gandakan lotnya dan statement utk locking tdk pernah tercapai.

    untuk membatasi jumlah order kayaknya ga bisa mas. karena martingale harus terus menggandakan lotnya. kalau dibatasi berarti dia akan floating minus yg sangat besar kalau arah berlawanan dengan order. oleh sebab itu dipakai lock 0.2 lot saat trend berubah arah. nah yg skrg saya coba buat adalah bagaimana locknya itu bukan hanya 0.2 lot tetapi bisa menyesuaikan dengan order sebelumnya sehingga minus tdk bertambah sampai TP tercapai. tapi sampai skrg saya belum temukan caranya.

    Thanks mas atas masukan dan experimentnya.. !!! smoga EA super kita ini bisa berhasil.
    Prepaid Card ~ Harga Murah dan layanan cepat
    JogjaFX ~ Bonus lebih dari 50 usd / bulan
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  11. #11
    In Profit ef2122's Avatar
    Join Date
    Oct 2008
    Posts
    109
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Bro... atau mungkin diberi kasih batasan hari ya.... Misalnya trading dilakukan dari Senin sd. Kamis.... cuman belum saya coba. Hehe.... Kayae bisa lebih seru....
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  12. #12
    Elder Analyst chandrawg's Avatar
    Join Date
    May 2008
    Location
    Indonesia
    Posts
    602
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ef2122 View Post
    Bro... atau mungkin diberi kasih batasan hari ya.... Misalnya trading dilakukan dari Senin sd. Kamis.... cuman belum saya coba. Hehe.... Kayae bisa lebih seru....
    Kalau gitu tinggal tambahin script ini mas if(DayOfWeek()==5) return(0);
    jadinya...
    Code:
    #property copyright "Chandra Wiharja"
    #property link      "http://www.chandrawiharja.com"
    int start()
    {
       double pivot=iMA(NULL,1,16,0,MODE_SMMA,0,0);
       int total=OrdersTotal(),i,range=20,sl=0,slippage=10;
       if(DayOfWeek()==5) return(0);
       if (total<1)
          {
          if (Ask>pivot) OrderSend(Symbol(),OP_BUY,0.1,Ask,0,0,Ask+range*Point,"Order Buy 1",11111,0,Blue);
          if (Ask<pivot) OrderSend(Symbol(),OP_SELL,0.1,Bid,0,0,Bid-range*Point,"Order Sell 1",11111,0,Red);
          }
       else
          {
             OrderSelect(total-1, SELECT_BY_POS, MODE_TRADES);
             if (OrderType()==OP_BUY)
             {
             if  ((Ask+1*Point >= (OrderOpenPrice()-range*Point)) && (Ask-1*Point <= (OrderOpenPrice()-range*Point)))
                {
                   if (Ask>pivot) OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);
                   else 
                   {
                   OrderSend(Symbol(),OP_SELL,0.2,Bid,slippage,0,Bid-range*Point,"Hedging",11111,0,Red);
                   OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);               
                   }
                }
             else if ((Ask+1*Point >= (OrderOpenPrice()+range*Point)) && (Ask-1*Point <= (OrderOpenPrice()+range*Point))) closebuy();
             }
          
             if (OrderType()==OP_SELL)
             {
             if ((Bid+1*Point >= (OrderOpenPrice()+range*Point)) && (Bid-1*Point <= (OrderOpenPrice()+range*Point)))
                {
                   if (Bid<pivot) OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);
                   else 
                   {
                      OrderSend(Symbol(),OP_BUY,0.2,Ask,slippage,0,Ask+range*Point,"hedging",11111,0,Blue);
                      OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);                
                   }
                }
             else if ((Bid+1*Point >= (OrderOpenPrice()-range*Point)) && (Bid-1*Point <= (OrderOpenPrice()-range*Point))) closesell();
             }
          }   
       return(0);
    }
    void closebuy()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,5,CLR_NONE);
      }
       return(0);
    }
    void closesell()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,CLR_NONE);
      }
       return(0);
    }
    Prepaid Card ~ Harga Murah dan layanan cepat
    JogjaFX ~ Bonus lebih dari 50 usd / bulan
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  13. #13
    In Profit ef2122's Avatar
    Join Date
    Oct 2008
    Posts
    109
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Mas... udah tak cobain cuman gak asyik... Biasa masih pake pair USD/JPY. IMHO, diganti dengan cross MA lebih asyik... dah tak cobain dari awal 01-01-1999 sd 31-12-2007. Hasilnya lebih muantab... cuman begitu masuk tanggal 02-01-2008 hasilnya jeblok. Hehe...
    Code:
    #property copyright "Chandra Wiharja"
    #property link      "http://www.chandrawiharja.com"
    int start()
    {
       double S = iMA(NULL, 0, 8, 0, MODE_SMA, PRICE_CLOSE, 0);
       double F = iMA(NULL, 0, 2, 0, MODE_SMA, PRICE_CLOSE, 0);
       //double pivot=iMA(NULL,1,16,0,MODE_SMMA,0,0); //mencoba seandainya diganti perpotongan MA 8 dan 2
       int total=OrdersTotal(),i,range=20,sl=0,slippage=10;
       //if(DayOfWeek()==5) return(0); // bisa ditambahkan atau tidak
       if (total<1)
          {
          if (Ask>(S<F)) OrderSend(Symbol(),OP_BUY,0.1,Ask,0,0,Ask+range*Point,"Order Buy 1",11111,0,Blue);
          if (Ask<(S>F)) OrderSend(Symbol(),OP_SELL,0.1,Bid,0,0,Bid-range*Point,"Order Sell 1",11111,0,Red);
          }
       else
          {
             OrderSelect(total-1, SELECT_BY_POS, MODE_TRADES);
             if (OrderType()==OP_BUY)
             {
             if  ((Ask+1*Point <= (OrderOpenPrice()-range*Point)) && (Ask-1*Point <= (OrderOpenPrice()-range*Point)))
                {
                   if (Ask>(S<F)) OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);
                   else 
                   {
                   OrderSend(Symbol(),OP_SELL,0.2,Bid,slippage,0,Bid-range*Point,"Hedging",11111,0,Red);
                   OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);               
                   }
                }
             else if ((Ask+1*Point >= (OrderOpenPrice()+range*Point)) && (Ask-1*Point >= (OrderOpenPrice()+range*Point))) closebuy();
             }
          
             if (OrderType()==OP_SELL)
             {
             if ((Bid+1*Point >= (OrderOpenPrice()+range*Point)) && (Bid-1*Point >= (OrderOpenPrice()+range*Point)))
                {
                   if (Bid<(S>F)) OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);
                   else 
                   {
                      OrderSend(Symbol(),OP_BUY,0.2,Ask,slippage,0,Ask+range*Point,"hedging",11111,0,Blue);
                      OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);                
                   }
                }
             else if ((Bid+1*Point <= (OrderOpenPrice()-range*Point)) && (Bid-1*Point <= (OrderOpenPrice()-range*Point))) closesell();
             }
          }   
       return(0);
    }
    void closebuy()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,5,CLR_NONE);
      }
       return(0);
    }
    void closesell()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,CLR_NONE);
      }
       return(0);
    }
    Masih ada yang salah logikanya... OP Buy mlulu.... mungkin kalo ada OP Sell bisa ngimbangin kali....
    Mohon pentunyuk.... agar bisa lebih bisa trial and error lagi, maklum bukan orang IT.
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  14. #14
    In Profit stefanuswpssi's Avatar
    Join Date
    May 2008
    Location
    East Borneo
    Posts
    108
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    salam para master

    wah ... melihat perbincangan diatas, saya sangat ingin membantu

    tapi apa yang bisa saya lakukan yah ???

    paling hanya bisa baca thread saja

    selamat berjuang deh, moga bisa di dapatkan EA yang tangguh

    dan bisa memberikan manfaat bagi banyak orang.

    salam
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

  15. #15
    In Profit awangk's Avatar
    Join Date
    Jun 2008
    Posts
    215
    FXO Shares
    0
    FXO Bonus
    $0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ef2122 View Post
    Mas... udah tak cobain cuman gak asyik... Biasa masih pake pair USD/JPY. IMHO, diganti dengan cross MA lebih asyik... dah tak cobain dari awal 01-01-1999 sd 31-12-2007. Hasilnya lebih muantab... cuman begitu masuk tanggal 02-01-2008 hasilnya jeblok. Hehe...
    Code:
    #property copyright "Chandra Wiharja"
    #property link      "http://www.chandrawiharja.com"
    int start()
    {
       double S = iMA(NULL, 0, 8, 0, MODE_SMA, PRICE_CLOSE, 0);
       double F = iMA(NULL, 0, 2, 0, MODE_SMA, PRICE_CLOSE, 0);
       //double pivot=iMA(NULL,1,16,0,MODE_SMMA,0,0); //mencoba seandainya diganti perpotongan MA 8 dan 2
       int total=OrdersTotal(),i,range=20,sl=0,slippage=10;
       //if(DayOfWeek()==5) return(0); // bisa ditambahkan atau tidak
       if (total<1)
          {
          if (Ask>(S<F)) OrderSend(Symbol(),OP_BUY,0.1,Ask,0,0,Ask+range*Point,"Order Buy 1",11111,0,Blue);
          if (Ask<(S>F)) OrderSend(Symbol(),OP_SELL,0.1,Bid,0,0,Bid-range*Point,"Order Sell 1",11111,0,Red);
          }
       else
          {
             OrderSelect(total-1, SELECT_BY_POS, MODE_TRADES);
             if (OrderType()==OP_BUY)
             {
             if  ((Ask+1*Point <= (OrderOpenPrice()-range*Point)) && (Ask-1*Point <= (OrderOpenPrice()-range*Point)))
                {
                   if (Ask>(S<F)) OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);
                   else 
                   {
                   OrderSend(Symbol(),OP_SELL,0.2,Bid,slippage,0,Bid-range*Point,"Hedging",11111,0,Red);
                   OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);               
                   }
                }
             else if ((Ask+1*Point >= (OrderOpenPrice()+range*Point)) && (Ask-1*Point >= (OrderOpenPrice()+range*Point))) closebuy();
             }
          
             if (OrderType()==OP_SELL)
             {
             if ((Bid+1*Point >= (OrderOpenPrice()+range*Point)) && (Bid-1*Point >= (OrderOpenPrice()+range*Point)))
                {
                   if (Bid<(S>F)) OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);
                   else 
                   {
                      OrderSend(Symbol(),OP_BUY,0.2,Ask,slippage,0,Ask+range*Point,"hedging",11111,0,Blue);
                      OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);                
                   }
                }
             else if ((Bid+1*Point <= (OrderOpenPrice()-range*Point)) && (Bid-1*Point <= (OrderOpenPrice()-range*Point))) closesell();
             }
          }   
       return(0);
    }
    void closebuy()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,5,CLR_NONE);
      }
       return(0);
    }
    void closesell()
    {
    int total=OrdersTotal(),i;
    for(i=total-1; i>=0; i--)
      {
         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,CLR_NONE);
      }
       return(0);
    }
    Masih ada yang salah logikanya... OP Buy mlulu.... mungkin kalo ada OP Sell bisa ngimbangin kali....
    Mohon pentunyuk.... agar bisa lebih bisa trial and error lagi, maklum bukan orang IT.
    Bro,
    yg bikin salah ini:

    Code:
          if (Ask>(S<F)) BUY
          if (Ask<(S>F)) SELL
    (S<F) artinya jika S<F maka true, selain itu false,
    true di MT4 itu 1, false=0

    jadi di terjemahkan
    Ask>1 atau Ask>0 BUY
    Ask<1 atau Ask<0 SELL

    udah jelas bila pake pair USDJPY saat ini 98.26 maka akan BUY terus.

    rgds,
    Share on VK Share on Facebook Share on Odnoklassniki Share on MySpace Share on Twitter Share on LiveJournal Share on Google+ Share on Ya.ru Share on Mail.Ru

Page 1 of 13 1234511 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Calendar Collapse this Category
From Date:Select Date
To Date:Select Date
News Importance:
Show
Fri, 18 Apr 00:00 GMT
Date
SGD
Currency
High
Importance
Description
Market Holiday - Good Friday (),
ActualForecastPrevious
Fri, 18 Apr 00:00 GMT
Date
MXV
Currency
High
Importance
Description
Market Holiday - Good Friday (),
ActualForecastPrevious
Fri, 18 Apr 00:00 GMT
Date
VEF
Currency
High
Importance
Description
Market Holiday - Good Friday (),
ActualForecastPrevious
Make your BET!!!
BUY FXO Forum Shares
35
Shares in the BANK:
We BuyWe Sell
$1.318$1.3588
The Best Spread 160x600id