Jump to content

[REQ] Newsfilter for SWR Grid EA


Recommended Posts

Hi folks,

could somebody add a newsfilter to the following EA, please? ^:)^

 

Here is the EA: hxxp://www.fileuploadx.de/229821

 

Here are some codes which may help:

 

This code is for FFCal indicator.

Code:

 

extern bool NewsFilter = true;

extern int MinutesBeforeNews = 10;

extern int MinutesAfterNews = 10;

extern bool IncludeHigh = true;

extern bool IncludeMedium = true;

extern bool IncludeLow = false;

extern bool IncludeSpeaks = true;

int MinutesUntilNextEvent,MinutesAfterPrevEvent;

bool TradingTime;

datetime Time2,Time3,Time4;

 

 

FFCal Indi: http://www.file-upload.net/download-...FFCal.mq4.html

 

This function to check if trading is permitted:

 

bool NewsPeriod()

{if (TimeCurrent()>Time4 && NewsFilter)

{MinutesUntilNextEvent=iCustom(Symbol(),0,"FFCal", IncludeHigh,IncludeMedium,IncludeLow,IncludeSpeaks ,true,true,1,1);

MinutesAfterPrevEvent=iCustom(Symbol(),0,"FFCal",I ncludeHigh,IncludeMedium,IncludeLow,IncludeSpeaks, true,true,1,0);

if (MinutesUntilNextEvent!=99999 || MinutesAfterPrevEvent!=99999)

{Time2=iTime(Symbol(),1,0)-(MinutesAfterPrevEvent-MinutesAfterNews)*60;

Time3=iTime(Symbol(),1,0)+(MinutesUntilNextEvent-MinutesBeforeNews)*60;

Time4=iTime(Symbol(),1,0)+(MinutesUntilNextEvent+M inutesAfterNews)*60;}}

TradingTime=(TimeCurrent()>Time2 && (TimeCurrent()<Time3 || TimeCurrent()>Time4)); return(TradingTime);}

 

 

Maybe this could be used, too:

 

http://www.forexsharing.com/457178

 

 

Thank you very much for your efforts! I would be deeply grateful if somebody could do that! Unfortunately I can´t code. :(

Best regards!

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...