" "

forexchief

Please help.. bantuin bikin EA

Discussion in 'Indikator dan EA' started by wasenpa, Sep 28, 2011.

Share This Page

  1. wasenpa

    wasenpa Active Member

    Messages:
    1,356
    Likes Received:
    11
    Trophy Points:
    38
    Anyone yang bisa coding bikin EA.. please message ya.. perlu bantuan logic money manajemen, thx before.

    -wsp-
    " "
  2. marsya7

    marsya7 New Member

    Messages:
    303
    Likes Received:
    4
    Trophy Points:
    0
    mencoba membantu...

    Code:
    double Lots() {
       int li_0;
       int Risk = 10;//besarnya resiko yg sanggup ditanggung dalam sekali OP default 10% dari FreeMargin
       int spread = MarketInfo(Symbol(),MODE_SPREAD);
       int sl = 25 - spread ;//diisi dalam pip kemudian dikurangi spread jika OP BUY, atau ditambah spread jika OP SELL
       double LOTSTEP = NormalizeDouble(MarketInfo(Symbol(), MODE_LOTSTEP), 2);
       double tickvalue = MarketInfo(Symbol(), MODE_TICKVALUE);
       if (LOTSTEP == 0.01) li_0 = 2;
       else li_0 = 1;
       int leverage = AccountLeverage();   
       double MM = NormalizeDouble(AccountFreeMargin()*Risk/100/(1000/leverage)/(sl*tickvalue), li_0);
       double MINLOT = NormalizeDouble(MarketInfo(Symbol(), MODE_MINLOT), 2);
       double MAXLOT = NormalizeDouble(MarketInfo(Symbol(), MODE_MAXLOT), 2);
       if (MM < MINLOT) MM = MINLOT;
       if (MM > MAXLOT) MM = MAXLOT;
       return (MM);
    }
    semoga membantu om...
    Last edited: Sep 28, 2011
  3. wasenpa

    wasenpa Active Member

    Messages:
    1,356
    Likes Received:
    11
    Trophy Points:
    38
    terima kasih marsya
  4. wasenpa

    wasenpa Active Member

    Messages:
    1,356
    Likes Received:
    11
    Trophy Points:
    38
    ada yg bisa bantuin bikin EAnya dengan indi default meta (MA)
    berikut pic nya

    [​IMG]

    untuk input di bikin optional saja klo bisa

    MA fast periode : 10
    MA fast methode : 0
    MA fast apply : 0
    MA slow periode : 30
    MA slow methode : 0
    MA slow apply : 0
    Takingprofit : 20
    martiangel : 2 ( bisa 2X, atau 3X )
    =================
    stoploss : next crosing. ( jadi ga fix)
    sinyal : 1 cross = 1 open posisi


    thx before

    -wsp-
  5. wasenpa

    wasenpa Active Member

    Messages:
    1,356
    Likes Received:
    11
    Trophy Points:
    38
    haduhh sepi amirr.... kesian treadnya.. sundull ahh :cz23:
  6. imfxtrdr

    imfxtrdr Member

    Messages:
    175
    Likes Received:
    6
    Trophy Points:
    18
  7. wasenpa

    wasenpa Active Member

    Messages:
    1,356
    Likes Received:
    11
    Trophy Points:
    38
    makasih bgt om... ini dia yg saya cari.. tgl di pake dgn settingan yg pas ( bakctest over 2006,2007,2008,2009,2010,2011 ) jika drawdown di bawah <30% dan sebulan bisa profit 3-10% lolos EA nya :cz38:

    i love this forum

    -wsp-
    Last edited: Oct 16, 2011
  8. apepaz86

    apepaz86 New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    cara coding nich code gmn yach supaya ada hidden TP dan SL

    Misi para master, ane mw minta tlong nich ada yg bs edit coding supaya nich code bs ada hidden TP jg SL nya...
    PHP:
    //---- input parameters
    extern int       p 10;
    extern double    tp 50;
    extern double    sl 100;
    extern double    lots 1;
    extern int       losseslimit 1000000;
    extern bool      fastoptimize true;
    extern int       mn 888;
    static 
    int       prevtime 0;
    static 
    int       losses 0;

    //+------------------------------------------------------------------+
    //| expert start function                                            |
    //+------------------------------------------------------------------+
    int start()
    {  
       if (
    Time[0] == prevtime) return(0);
       
    prevtime Time[0];
       
       if (! 
    IsTradeAllowed()) {
          
    prevtime Time[1];
          
    MathSrand(TimeCurrent());
          
    Sleep(30000 MathRand());
       }
    //----
       
    int total OrdersTotal();
       for (
    int i 0totali++) {
          
    OrderSelect(iSELECT_BY_POSMODE_TRADES);
          if (
    OrderSymbol() == Symbol() && OrderMagicNumber() == mn) {
             return(
    0);
          } 
       }
       
       
    int ticket = -1;
       
       
    double lt getLots();
       if (
    losses >= losseslimit) {
          
    SendMail(WindowExpertName() + " Too many losses""Chart " Symbol());
          return(
    0);
       }
       
       if (
    iDeMarker(Symbol(), 0p0) > 0.5) {
          
    RefreshRates();
          
    ticket OrderSend(Symbol(), OP_BUYltAsk1Bid sl PointBid tp PointWindowExpertName(), mn0Blue); 
          if (
    ticket 0) {
             
    Sleep(30000);
             
    prevtime Time[1];
          }
       } else {
          
    ticket OrderSend(Symbol(), OP_SELLltBid1Ask sl PointAsk tp PointWindowExpertName(), mn0Red); 
          
    RefreshRates();
          if (
    ticket 0) {
             
    Sleep(30000);
             
    prevtime Time[1];
          }
       }
       
    //+-------------------------------------------------------------------------------------------+  
    //-- Exit --
       
    return(0);
    }
    //+--------------------------- getLots ----------------------------------+

    double getLots() {

       if (
    IsOptimization() && fastoptimize) {
          return(
    lots);
       }
      
       
    losses 0;
       
    double minlot MarketInfo(Symbol(), MODE_MINLOT);
       
    int round MathAbs(MathLog(minlot) / MathLog(10.0)) + 0.5;
       
    double result lots;
       
    int total OrdersHistoryTotal();
       
    double spread MarketInfo(Symbol(), MODE_SPREAD);
       
    double k = (tp sl) / (tp spread);
       for (
    int i 0totali++) {
          
    OrderSelect(iSELECT_BY_POSMODE_HISTORY);
          if (
    OrderSymbol() == Symbol() && OrderMagicNumber() == mn) {
             if (
    OrderProfit() > 0) {
                
    result lots;
                
    losses 0;
             } else {
                
    result result k;
                
    losses++;
             }
          }
       }
       
    result NormalizeDouble(resultround);
       
    double maxlot MarketInfo(Symbol(), MODE_MAXLOT);
       if (
    result maxlot) {
          
    result maxlot;
       }
       if (
    result minlot) {
          
    mn mn 1;
       }
       
    RefreshRates();
       return(
    result);
    }
    Last edited: Nov 22, 2012
  9. Shura

    Shura New Member

    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    0
    bikin sendiri om jangan males males :))
  10. wasenpa

    wasenpa Active Member

    Messages:
    1,356
    Likes Received:
    11
    Trophy Points:
    38
    ini lagi latihan nuliss:59:

Share This Page