Download MetaTrader 5

EA avoid All Day high news with ffcal

To add comments, please log in or register
fulltilt
372
fulltilt  

Guys, how can I avoid open orders with ffcal newsfilter on "All Day" high news like below?

Is this happen when <forecast/><previous/> have empty values (see below)

f. ex.
if(MinToNews<=MinsBeforeNews &&  ImpactToNews>=MinimumImpact && forecast==NULL && previous==NULL)


<event><title>Eurogroup Meetings</title><country>EUR</country><date>02-16-2015</date><time>10:15am</time><impact>High</impact><forecast/><previous/></event>



another newsspot with forecast & previous looks like:

<event><title>Trade Balance</title><country>EUR</country><date>02-16-2015</date><time>10:00am</time><impact>Low</impact><forecast>21.3B</forecast><previous>20.0B</previous></event>

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
You are wrong here. We just use impact for filtering the trades. 0 is lowest impact news, 3 is highest impact news. Just use that number to filter trades. Use iCustom() to get the value.
fulltilt
372
fulltilt  

thanks, I know that but I want to add an additional rule for the whole day high impact news and I need to now how to catch them f. ex.

if(MinToNews<=MinsBeforeNews &&  ImpactToNews>=MinimumImpact && forecast==NULL && previous==NULL) return=0;
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
Use 3 and the ea will avoid all high impact news. Read carefully ffcal and should get your answer already. There are many ffcal variance that works like what you want. Just how you figure it out. It is not that hard.
fulltilt
372
fulltilt  

OK, I guess the IndexBuffer for previous and forcast values should be "2"

dispForecast[2],
dispPrevious[2];

and a condition that prevents opening orders while forcast values are empty should look like that ... right?

int forcastNull = iCustom(NULL, 0, "FFCal", true, true, false, true, true, 1, 2);
if (forcastNull == "") return=0;
fulltilt
372
fulltilt  

that should be work ... or is something wrong?

I'll check for high news w/ NewsExist() and if Forecast value are empty

// whole day news high impact check
   int ForecastNull =  iCustom(NULL, 0, "FFCal", true, false, false, Gi_3168, 1, 1, 2);
   int PreviousNull =  iCustom(NULL, 0, "FFCal", true, false, false, Gi_3168, 1, 1, 2);

   if (AvoidAllDayNews && NewsExist() == 1 && ForecastNull == "" || PreviousNull == "") return(0);
To add comments, please log in or register