Results 1 to 2 of 2
 1 Attachment(s)    

Thread: New news filter with ffcal

  1. #1
    Senior Member fxtester's Avatar
    Join Date
    Nov 2008
    Posts
    3,165

    Default New news filter with ffcal

    As the previous ffcall doesn't work anymore.

    Before Start :

    Code:
    extern bool AvoidNews           = true;
    extern int MinimumImpact        = 3; //3=red news, 2=orange, 1=yellow
    extern int MinsBeforeNews       = 60;
    extern int MinsAfterNews        = 30;
    Code:
    bool ContinueTrading=true;
    int PrevMinute=-1;
    
    int MinSinceNews=0,MinToNews=0,ImpactSinceNews=0,ImpactToNews=0;
    Inside Start :

    Code:
    if(AvoidNews==true){
          if(Minute()!=PrevMinute){
             MinSinceNews=iCustom(NULL,0,"FFCal.Alerts",true,true,false,true,true,1,0);
             MinToNews=iCustom(NULL,0,"FFCal.Alerts",true,true,false,true,true,1,1);
             
             ImpactSinceNews=iCustom(NULL,0,"FFCal.Alerts",true,true,false,true,true,2,0);
             ImpactToNews=iCustom(NULL,0,"FFCal.Alerts",true,true,false,true,true,2,1);
          
              ContinueTrading=true;
              PrevMinute=Minute();
              if((MinToNews<=MinsBeforeNews &&  ImpactToNews>=MinimumImpact) || (MinSinceNews<=MinsAfterNews && ImpactSinceNews>=MinimumImpact))ContinueTrading=false;
          }
       }
    Before OrderSend or Inside entry conditions :

    Code:
    if(ContinueTrading==true)
    Attached Files Attached Files

  2. #2
    Senior Member fxtester's Avatar
    Join Date
    Nov 2008
    Posts
    3,165

    Default

    Finally this ffcal indicator is missing some news...

Similar Threads

  1. Add a news filter
    By funyoo in forum MQL programming
    Replies: 16
    Last Post: 03-11-2016, 09:04
  2. News filter without any indicator
    By fxtester in forum MQL programming
    Replies: 5
    Last Post: 07-24-2015, 03:43
  3. (REQ) News Filter
    By YOAV3211 in forum MQL programming
    Replies: 0
    Last Post: 03-16-2013, 18:42
  4. TSD News filter code
    By dave_rimmer in forum MQL programming
    Replies: 0
    Last Post: 01-29-2011, 20:44

Tags for this Thread

indicator, news

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •