web statistics


Bagian 8 - Menyusun EA

Discussion in 'Tutorial MQL4' started by white_tiger, Oct 20, 2008.

  1. Hampir Saja

    Hampir Saja
    Expand Collapse
    Member

    Joined:
    Jul 26, 2011
    Messages:
    102
    Likes Received:
    1
    sory kalo boleh ikutan bahas (saya bukan yg punya thread ini):

    1/ Slippage nya jgn dibikin nol krn slippage nol tuh di real trade terlalu idealis ato sulit, tp jgn kegedean, ntar rugi sendiri.
    2/ tf berapa? Open[n]==Close[n] tuh jarang bgt terjadi, plg juga ada selisih walaupun 0.5 pips
    3/ Itu di Live/Real account gak akan bisa jalan, karena SL dan TP didefinisikan di code send order langsung, bukan pending order. Harus dipisah di modify order kalo mau jalan di real account.
    4/ itu Lot (Lt) = 1, gak kegedean? Kalo modal kekecilan bisa langsung marjin call, atau kalo leverage kekecilan, bisa direject sama broker, gak ada ruang untuk tahanan marjin.
     
  2. Hampir Saja

    Hampir Saja
    Expand Collapse
    Member

    Joined:
    Jul 26, 2011
    Messages:
    102
    Likes Received:
    1
    NB:
    1/init-deinit kalo gak kepake hapus aja, toh kosong
    2/ start kok "int", kenapa gak "void"?
     
  3. bian

    bian
    Expand Collapse
    New Member

    Joined:
    Feb 22, 2012
    Messages:
    12
    Likes Received:
    0
    Salam Bos, saya mau Ea yang
    1. Op Buy jika MA4+MA8+ MA50 bersilang
    2. Op Buy saja jika MA4+MA8 bersilang dan berada di atas MA50
    manakala Op Sell
    1. Op Sell jika MA4+MA8+ MA50 bersilang
    2. Op Sell saja jika MA4+MA8 bersilang dan berada di bawah MA50

    kalau tambah trailing lagi cantik bos...terimakasih

    t
     
  4. bian

    bian
    Expand Collapse
    New Member

    Joined:
    Feb 22, 2012
    Messages:
    12
    Likes Received:
    0
    Salam bro. Tolong saya, code/ bahasa Ea jika kita mau..
    1) Op Buy, jika MA4+MA8+MA50 bersilang
    2) Op Buy saja, jika MA4+MA8 bersilang ketika berada di atas garisan MA50

    Manakala Op Sell
    1) Op Sell, jika MA4+MA8+MA50 bersilang
    2) Op Sell saja, jika MA4+MA8 bersilang ketika berada di bawah garisan MA50

    Kalau ada trailing kan cantik lagi ya bos....
    terima kasih
     
  5. ahmadsyaean78

    ahmadsyaean78
    Expand Collapse
    New Member

    Joined:
    Oct 18, 2013
    Messages:
    1
    Likes Received:
    0
    modify take profit

    salam profit para master.......

    master master Ea tolong dong,,,,! saya di kasi code buat modify take profit untuk ea martingale
    yang ngitungnya dari open ter akhir tetapi yang bisa modif kalau misal Op terakhir di close manual

    terima kasih
     
  6. pande hana

    pande hana
    Expand Collapse
    New Member

    Joined:
    Oct 31, 2013
    Messages:
    2
    Likes Received:
    0
    penggunaan trailing stop untuk EA

    mau tanya masta untuk EA perintah codingnya mau di isi trailing stop gimana caranya yaa?

    terima kasih
     
  7. pande hana

    pande hana
    Expand Collapse
    New Member

    Joined:
    Oct 31, 2013
    Messages:
    2
    Likes Received:
    0
    Trailing Stop untuk EA

    penggunaan trailing stop untuk EA

    mau tanya masta untuk EA perintah codingnya mau di isi trailing stop gimana caranya yaa?
    ;)

    terima kasih:x
     
  8. derinzah

    derinzah
    Expand Collapse
    New Member

    Joined:
    Jul 30, 2016
    Messages:
    1
    Likes Received:
    0
    pak chandrawg slam kenal,,(DHERY OGAN)..saya mau minta tolong modif ea ini,,ea ini akan buka po sels top dan buy stop di awal nya,,jika salah satu po tersentuh maka po berikutnya akan langsung di buka,,contoh bila buystop tersentuh maka akan langsung terbuka buystop di atas nya dengan jarak sesuai set,,saya mau minta tolong di tambahin sistem begini contohnya:..bila buystop tersentuh maka akan langsung terbuka buystop di atas nya dengan jarak sesuai set dan bila buystop yang tersentuh tadi takeprofit maka akan buka sellstop di bawah harga takeprofit tadi dengan jarak sesuai yg di set,,berlaku sebaliknya jika sellstop yang tersentuh dan tp,,terimakasih pak,,semoga selalu opit berkelanjutan,,,bisa juga dikirim ke email saya codingnya nya,,ujanmas0212@gmail.com,,,
    ini contoh coding yang sudah ada mohon ditambah dengan yg permintaan di atas,,thx pak
    //+------------------------------------------------------------------+
    //| EA Pending Order.mq4 |
    //| Copyright 2012, MetaQuotes Software Corp. |
    //| http://www.metaquotes.net |
    //-------------------------------------------------------------------+


    [HASHTAG]#property[/HASHTAG] copyright ""
    [HASHTAG]#property[/HASHTAG] link ""

    extern string Nama_EA = "pending 1";
    extern int Mulai_Jam = 6;
    extern int Akhir_Jam = 20;
    extern int TP = 20;
    extern int SL = 100;
    extern double Lots = 0.01;
    extern int Jarak = 15;
    extern int Magic = 69;

    double slb,tpb,sls,tps,pt;
    int wt,wk,tiket,ticet;
    //+------------------------------------------------------------------+
    //| expert initialization function |
    //+------------------------------------------------------------------+
    int init()
    {
    //----
    if(Digits==3 || Digits==5) pt=10*Point; else pt=Point;
    //----
    return(0);
    }
    //+------------------------------------------------------------------+
    //| expert deinitialization function |
    //+------------------------------------------------------------------+
    int deinit()
    {
    //----

    //----
    return(0);
    }
    //+------------------------------------------------------------------+
    //| expert start function |
    //+------------------------------------------------------------------+
    int start()
    {
    label();
    if(Jam_trade()==1){
    if(jumlahorder(4)==0)OrderSend(Symbol(), OP_BUYSTOP,NR(Lots) , Ask+ Jarak*Point, 3, Ask+ Jarak*Point-SL*Point,Ask+Jarak*Point+TP*Point, "", Magic, 0, Blue);
    if(jumlahorder(5)==0)OrderSend(Symbol(), OP_SELLSTOP,NR(Lots) , Bid-Jarak*Point, 3, Bid- Jarak*Point+SL*Point,Bid-Jarak*Point-TP*Point, "", Magic, 0, Yellow);
    }
    return(0);
    }
    //+------------------------------------------------------------------+

    int Jam_trade()
    {
    bool trade = false;
    if(Mulai_Jam > Akhir_Jam){
    if (Hour() >= Mulai_Jam || Hour() < Akhir_Jam) trade = true;
    } else
    if (Hour() >= Mulai_Jam && Hour() < Akhir_Jam) trade = true;

    return (trade);
    }

    int jumlahorder( int tipe)
    {
    int total=0;
    for(int i=0; i<OrdersTotal(); i++)
    {
    OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
    if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=Magic || OrderType()!=tipe) continue;
    total++;
    }

    return(total);
    }
    double NR(double thelot)
    {
    double maxlots = MarketInfo(Symbol(), MODE_MAXLOT),
    minilot = MarketInfo(Symbol(), MODE_MINLOT),
    lstep = MarketInfo(Symbol(), MODE_LOTSTEP);
    double lots = lstep * NormalizeDouble(thelot / lstep, 0);
    lots = MathMax(MathMin(maxlots, lots), minilot);
    return (lots);
    }

    void label()
    {
    Comment("\n ",
    "\n ",
    "\n ------------------------------------------------",
    "\n :: =>pending1<=",
    "\n :: =>pending1<=",
    "\n ------------------------------------------------",
    "\n :: Spread : ", MarketInfo(Symbol(), MODE_SPREAD),
    "\n :: Leverage : 1 : ", AccountLeverage(),
    "\n :: Equity : ", AccountEquity(),
    "\n :: Jam Server :", Hour(), ":", Minute(),
    "\n ------------------------------------------------",
    "\n :: >>p<<",
    "\n ------------------------------------------------");
    }
     
  9. bikers

    bikers
    Expand Collapse
    New Member

    Joined:
    Jul 24, 2015
    Messages:
    1
    Likes Received:
    0
    boss white_tiger, maaf newbie mau modif EA yg di attachment, bisa kah...? biaya berapa kah...? trims...
     

    Attached Files:

  10. Majumapan

    Majumapan
    Expand Collapse
    New Member

    Joined:
    Mar 10, 2018
    Messages:
    1
    Likes Received:
    0
    Maaf bos...nubi mau minta tolong dikit ni...saya suka sm strateginya bro anova di page 9...tp saya mau logikanya dibalik...ea dipasang dan ea memasang TP dan SL bila SL tersentuh maka ea langsung buka posisi yg sama dengan nilai open sama dengan nilai SL tersentuh tadi...scriptnya gmn ya bos....diutak atik g ketemu juga...
     

Share This Page