I think you need to modify the indicator code to make "after the event" condition work properly.

By default, the event will be removed/replaced after 10 minutes of its time and so the Buffer that holds the value.

Also, Please note that the simple call method will always return the default indicator parameters which means you will get all "High impact events" that may not be related to the current pair. If that is the case its fine, otherwise you need to use the advanced call method:

SInce I never worked with icustom indictaors before, I need to ask you another question. Does the indicator need to be placed on the chart of each currency pair that I use or will the call in my EA be enough?

SInce I never worked with icustom indictaors before, I need to ask you another question. Does the indicator need to be placed on the chart of each currency pair that I use or will the call in my EA be enough?

Thanks

Depending on how you’re going to call, the simple method uses no parametersso the iCustom function will returns the default indicator parametersvalues which has been set to report for all currency pairs(except CNY) by default. In that case only one chart would be enough.

But the advanced method is like to override the indicator parameters inputs with your own values and if you didn't specify any parameters, the default values will be used. These parameters should go after the name of the custom indicator separated by commas.

Depending on how you’re going to call, the simple method uses no parametersso the iCustom function will returns the default indicator parametersvalues which has been set to report for all currency pairs(except CNY) by default. In that case only one chart would be enough.

But the advanced method is like to override the indicator parameters inputs with your own values and if you didn't specify any parameters, the default values will be used. These parameters should go after the name of the custom indicator separated by commas.

As the example below, the fourth parameter "true" is refers to the first indicator parameterReport for active chart only

If you use it that way, it will return the data form the chart that the indicator is attached to so the indicator need to be placed on each chart you like to use.

I modified the code of my EA as suggested and once restarted, the "call" worked and the indicator window and data appeared without problems on the chart without any problem.

Now all I hope is that when there is an event 3, that the EA stops working for the period of 30 min prior and 30 mins after.

Question: Would it be possible for the future, that you create for testing purpose only a dummy xml file with false data so that during testing, would send alerts when the EA stops and restarts after a dummy event?

I modified the code of my EA as suggested and once restarted, the "call" worked and the indicator window and data appeared without problems on the chart without any problem.

Now all I hope is that when there is an event 3, that the EA stops working for the period of 30 min prior and 30 mins after.

Question: Would it be possible for the future, that you create for testing purpose only a dummy xml file with false data so that during testing, would send alerts when the EA stops and restarts after a dummy event?

Thanks for all the help so far. You have really been great!!

You're welcome my friend.

Well, it's possible but it's kinda useless since all events based on time, you will have to change the time manually :)

But why don't you just filter out only the high impact events from the indicator settings then use the Alert based on the Event minutes left? You can see the event time left in minutes when you mouse hover on the event.

Example: recent event time left is 582 minutes so set the first alert to 582 and so on.

Edit: I forgot to mention about the EA alerts.

You can use something like this:

if(EventTime && HighImpact)
{
MessageBox("Stopping all trades due to possibility of High impact Event!"); // Alert() function does not work .. orSendNotification("Stopping all trades due to possibility of High impact Event!"); // orSendMail("EA Status","Stopping all trades due to possibility of High impact Event!");
return;
}

I have another question for you, since there is a "" in the indicator, I suppose that it is for reporting chosen keywords as found in the event title. So suppose that I am very worried that the nonfarm payrolls or the FOMC have such a high impact, that I would consider to stop all trades for at least one hour after the event, contrarily to 30 minutes for most level 3 events.

So how do I tell the indicator that I want all level 3 events, but I that I also need to know when that event is the "Nonfarm Payrolls" or the "FOMC"?

I have another question for you, since there is a "" in the indicator, I suppose that it is for reporting chosen keywords as found in the event title. So suppose that I am very worried that the nonfarm payrolls or the FOMC have such a high impact, that I would consider to stop all trades for at least one hour after the event, contrarily to 30 minutes for most level 3 events.

So how do I tell the indicator that I want all level 3 events, but I that I also need to know when that event is the "Nonfarm Payrolls" or the "FOMC"?

Does the below code go in the right direction?

Yes, it's good just a few notes:

You need to write the word (or even 2 words) exactly as it shown in the calendar, i think it's "Non-Farm" not "Nonfarm"? it maybe easier if you just copy/past it.

Just note that other currenciesmaycontain the same word. i.e. EUR have "French Final Non-Farm Payrolls q/q"

You don't have to write down all the custom parameters unless you want to change the "following" parameter.

It's OK with the string call, the indicator uses StringFind() function which return an integer.

about "3" or "keyword" .. it will rerun both :) , actually it will return the Buffer value: