1. 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

Answered Menambahkan filter time hari

Discussion in 'Belajar MQL dari Nol' started by Indriawan Jalu, 26 Apr 2016.

  1. Indriawan Jalu

    Indriawan Jalu New Member

    Equity
    Credit
    Ref Point
    Temen-temen untuk menambahkan filter time hari apa yg harus dimasukan? kalo ada contoh mq4 biar untuk nubie belajar. Terimakasih
     
  2. rahmadjatayu

    rahmadjatayu Member Credit Hunter

    Equity
    Credit
    Ref Point
    pake DayofWeek() gan,
    minggu=0,senin =1,selasa=2 dst.
    contoh kodingnya,ngak trade di hari minggu dan sabtu.
    Code:
    if(DayOfWeek()==0 || DayOfWeek()==6) return(0);
    
     
  3. Yasir Arafat

    Yasir Arafat Member

    Equity
    Credit
    Ref Point
    biar filter hari bisa di rubah oleh user pakai ini bisa

    Code:
    extern bool   UseTradingDay      = TRUE;
    extern bool   Monday             = TRUE;
    extern bool   Tuesday            = TRUE;
    extern bool   Wednesday          = TRUE;
    extern bool   Thursday           = TRUE;
    extern bool   Friday             = TRUE;
    extern bool   Saturday           = TRUE;
    extern bool   Sunday             = TRUE;
    
    int day=DayOfWeek(),
        dayfilter=((Monday&&day==1)||(Tuesday&&day==2)||(Wednesday&&day==3)||(Thursday&&day==4)||(Friday&&day==5)||(Saturday&&day==6)||(Sunday&&day==7));
    
    nah nanti sebelum coding trigernya tambahkan ini
    Code:
    if(dayfilter){...triger dimasukkan disini...}
    sekian penjelasannya...
    jika mau ikut belajar koding simple silahkan mampir ke tread ane ini https://soehoe.com/buat-ea-mudah-rame-rame-seru-by-wame.t5169/#post-106505
     

Share This Page