1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)
    Dismiss Notice

Tanya Jawab MQL

Discussion in 'Belajar MQL dari Nol' started by HendroFX, 09 Apr 2015.

  1. ngasqus

    ngasqus Active Member Pioneer

    Equity
    Credit
    Ref Point
    mungkin bisa pake
    Code:
    double    pHigh      = iHigh(Pair,0,1);
    double    pLow      = iLow(Pair,0,1);
    double    pOpen      = iOpen(Pair,0,1);
    double    pClose      = iClose(Pair,0,1);
    int          pVolume  = iVolume(Pair,0,1);
    
    kalo untuk data dua candle ke belakang angka 1 tinggal diganti angka 2
     
  2. HendroFX

    HendroFX Moderator Moderator

    Equity
    Credit
    Ref Point
    iCustom diperuntukkan untuk memanggil Indikator sesuai dengan keinginan sendiri (CUSTOM), bila tidak ingin menggunakan iCustom , maka gunakan indikator bawaan MT4, seperti MA dll.
     
  3. giisa

    giisa New Member

    Equity
    Credit
    Ref Point
    terima kasih atas jawaban dan atensinya, salam hormat
     
  4. pamakandau

    pamakandau New Member

    Equity
    Credit
    Ref Point
    mau tanya dong sm om-om dan tante2 sekalian di forum ini... saya ada robot tapi expired.. saya udah compile nih robot tp ada masalah sekarang di semicolin expected dan itu jumblahnya banyak banget.. jd yang harusnya _ jadi (.) , gimana ya om dan tante jd banyak titiknya jd apa yg harus saya lakukan om/tante...?
     
  5. Threadmark: Mendeteksi Pesan Error pada Mq4
    HendroFX

    HendroFX Moderator Moderator

    Equity
    Credit
    Ref Point
    Biasanya kesalahan akan di tunjukkan pada saat EA di compile, jadi tinggal teliti baris ke berapa akan tahu masalahnya, coba teliti kembali. Kalau Tanda ( _ ) diganti titik ( .) tetntu akan bermakna lain dan akan menjadi error..
     
  6. yadi yadi

    yadi yadi Member Credit Hunter

    Equity
    Credit
    Ref Point
    bantuannya master2, maklum newbi
     

    Attached Files:

  7. Amir Syarifudin

    Amir Syarifudin Member Credit Hunter

    Equity
    Credit
    Ref Point
    yadi yadi , deklarasikan dulu variable interger, misal: int n;
    lalu
    n=OrderSend...
    n=OrderModify
    n=Order...
     
  8. HendroFX

    HendroFX Moderator Moderator

    Equity
    Credit
    Ref Point
    Bantuan seperti apa yang agan harapkan, harusnya ditanyakan dengan jelas
     
  9. yadi yadi

    yadi yadi Member Credit Hunter

    Equity
    Credit
    Ref Point
    tetep gk ngaruh master, tp di BT tetap work sih hanya compilenya saja selalu gitu.
     
    lihat di gambar master, dicompile nongol gitu
     
  10. Amir Syarifudin

    Amir Syarifudin Member Credit Hunter

    Equity
    Credit
    Ref Point
    yadi yadi , maksud ane seperti ini
    Code:
    n=OrderSend(symbol,OP_BUYSTOP,lot,price,SlipPage,pricesl,pricetp,comment,0,0,clrNONE);  
    bukan hanya ditulis
    n=OrderSend
     
  11. SANLANA

    SANLANA Active Member Credit Hunter

    Equity
    Credit
    Ref Point
    '}' - unexpected end of program

    '{' - unbalanced parentheses
    biar fix di apakan master hehehe..............
     
  12. pamakandau

    pamakandau New Member

    Equity
    Credit
    Ref Point
    Agan-agan yg baik hati ini EAnya expired, dah di compile tp malah eror.. minta tolong dong gan yg expired dihilangin.. sukur2 ada yg mau ubah EA ini jd script jd dipakenya cuma sekali ga berulang2 seperti di EA..
     

    Attached Files:

  13. Amir Syarifudin

    Amir Syarifudin Member Credit Hunter

    Equity
    Credit
    Ref Point

    Attached Files:

  14. Bani Muslim

    Bani Muslim New Member

    Equity
    Credit
    Ref Point
    Ingin belajar..tapi gak tau apa2..newbie. park tepi dulu pon boleh...mohon belajar boss..
     
  15. yadi yadi

    yadi yadi Member Credit Hunter

    Equity
    Credit
    Ref Point
  16. cr_fx

    cr_fx Member

    Equity
    Credit
    Ref Point
  17. sipoltakrajaminyak

    sipoltakrajaminyak Member Credit Hunter

    Equity
    Credit
    Ref Point
  18. yadi yadi

    yadi yadi Member Credit Hunter

    Equity
    Credit
    Ref Point
    oke makasih agan cr-fx
     
  19. Abi Manyu

    Abi Manyu Member Credit Hunter

    Equity
    Credit
    Ref Point
    permisi master dan momod.

    mohon pencerahannya dong untuk koding modify price pada pending order.
    ane buat script ini kok g termodify ya pricenya pada pending ordernya, kira-kira salahnya dimana ya, saat di compile tidak ada yang salah.
    Code:
    //+------------------------------------------------------------------+
    //|                                AA_EA_ModifyPricePendingOrder.mq4 |
    //|                                        Copyright 2015, Abimanyu. |
    //|                                https://www.facebook.com/m4nyunz |
    //+------------------------------------------------------------------+
    #property copyright "Copyright 2015, Abimanyu."
    #property link      "https://www.facebook.com/m4nyunz"
    #property version  "1.00"
    #property strict
    
    //====================================================================================================
    extern string Step_PO = "Jarak pending order dr skrg";
    extern int	  SL	    = 10;
    extern int	  TP	    = 150;
    extern double Step01	 = 15.0,  LOT01  = 50.0;
    int	  ticket;
    double  myPoint, myBid, myAsk, PriceSell1, PriceBuy1;
    
    //====================================================================================================
    int OnInit()
    {
      myPoint  = MarketInfo(Symbol(),MODE_POINT);
      myBid    = MarketInfo(Symbol(),MODE_BID);
      myAsk    = MarketInfo(Symbol(),MODE_ASK);
      PriceSell1  = myBid-Step01*myPoint;  PriceBuy1  = myAsk+Step01*myPoint;
      while(true) {
          ticket=OrderSend(Symbol(),OP_SELLSTOP,LOT01,PriceSell1 ,0,PriceSell1 +SL*myPoint,PriceSell1 -TP*myPoint,"AA_TebarProfit",0,0,clrNONE);
          ticket=OrderSend(Symbol(),OP_BUYSTOP ,LOT01,PriceBuy1  ,0,PriceBuy1  -SL*myPoint,PriceBuy1  +TP*myPoint,"AA_TebarProfit",0,0,clrNONE);
          if(ticket<=0) Print("Error = ",GetLastError());
          else { Print("ticket = ",ticket); break;}
          Sleep(10000);}
      return(INIT_SUCCEEDED);
    }
    
    //====================================================================================================
    void OnDeinit(const int reason)
    {
    }
    
    //====================================================================================================
    void OnTick()
    {
      for (int pos = 0; pos < OrdersTotal(); pos++) {
      OrderSelect(pos, SELECT_BY_POS, MODE_TRADES);
      if (OrderType() == OP_BUY) {
      OrderModify(OrderTicket(), PriceBuy1,PriceBuy1 -SL*myPoint, PriceBuy1  +TP*myPoint,0,clrNONE);}
      if (OrderType() == OP_SELL) {
      OrderModify(OrderTicket(), PriceSell1, PriceSell1 +SL*myPoint, PriceSell1-TP*myPoint,0,clrNONE);}}
    }
    makasih master,
    Salam Profit Indonesia
     
    • Funny Funny x 1
  20. sipoltakrajaminyak

    sipoltakrajaminyak Member Credit Hunter

    Equity
    Credit
    Ref Point
    nyimak juragan
    sekilas ane lihat itu pertama kurang tanda kurungnya juragan untuk sl/tp.
    kedua price sl/tpnya dinormalkan digitnya.
     

Share This Page