" "

forexchief

help bikin parameter max trade, ada yg bisa bantu?

Discussion in 'Indikator dan EA' started by spartacus, Jan 6, 2012.

Share This Page

  1. spartacus

    spartacus New Member

    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    halo master2 codingan..
    ada yg bisa bantuin tambahin parameter ea sederhana bikinan nubi ini gak?
    minta tolong dong tambahin paramater max trade yg bisa di setting,
    jadi logika nya begini: walaupun masih ada floating dia masih tetep bisa OP trade berdasarkan input indi yg dia baca.. dgn batasan OP dari settingan parameter yg kita mau.
    thanks ya yg mau bantu, ane lg belajar bikin ea pake generator nih.. maklum gk ngerti codingan.. please help me .. :63:

    hatur nuhun.

    Attached Files:

    " "
  2. jimbo3606

    jimbo3606 Member

    Messages:
    49
    Likes Received:
    3
    Trophy Points:
    8




    Maap gak bisa bantu ngedit
    saran aja coba tambahin
    --------------------------------------------------------------------
    extern int maxtrade=5; (misal max trade nya 5 OP)
    ---------------------------------------------------------------------
    //kemudian di dalam start ()
    ---------------------------------------------------------------------

    TotalOP=OrdersTotal();

    JumlahOP=0;
    for(int cnt=0;cnt<total;cnt++)
    {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if((OrderType()==OP_SELL) && // check for Sell opened position
    OrderSymbol()==Symbol()&& OrderMagicNumber()==magic)
    {
    JumlahOP++;


    }
    if((OrderType()==OP_BUY) && // check for Buy opened position
    OrderSymbol()==Symbol()&& OrderMagicNumber()==magic)
    {
    JumlahOP++;

    }
    }

    //pembatas OP nya seperti ini
    If (JumlahOP<MaxTrade ) //ini berarti jika jumlah OP kurang dari "Maxtrade" boleh OP lagi
    {
    // Signal BUY/SELL sesuai parameter om
    }
    ------------------------------------------------------------------------

    kira kira begitu om, semoga membantu
    kalo tidak membantu saya kasih kopi buat om
    [​IMG]
  3. spartacus

    spartacus New Member

    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    waduh malah dikasih codingan nya.. xixixi pdahal gak ngerti..:((
    btw thanks om, tak cobain duyu... :45:

    Gak bisa Om.. malah banyak yg eror setelah di compile.. hixhix
    Last edited: Jan 10, 2012

Share This Page