Indicator cannot open xml file with EA call

 

Hello all,

I don't know if anyone has ran into a similar problem like this or not but it's about to make me crazy. I have my metatrader 4 build 646 running on an Amazon VPS that's running Windows Server 2012. I have an indicator that fetches economic news from forex factory that I got from here . If I use this indicator and turn the AllowWebUpdates to true and the IsEA_Call to false it works fine. But since I want to call this indicator with an EA I've turned AllowWebUpdates to false and IsEA_Call to true. When doing so I get the error:

2014.06.15 22:16:23.310 FFCal AUDUSD,H1: Can't open xml file: 6-13-2014-AUDUSD60-FFCal.xml. The last error is 4103

From what I understand if AllowWebUpdates is false the indicator is supposed to fetch the xml file and store it and then use that file on the EA call. I've checked if the file is there, and it is. It just will not open it for some reason. Is this because of file permissions or some crazy access control setting that needs to be changed? By the way my call in my EA is right now is as follows:

//---Function to check if it is news time-----------------------------
bool NewsHandling()
   {
      static int PrevMinute = -1;
      if (Minute() != PrevMinute)
         {
            PrevMinute = Minute();
            int MinutesSincePrevEvent = iCustom(NULL, 0, "FFCalExtended", true, true, false, false, true, 1, 0);
            int MinutesUntilNextEvent = iCustom(NULL, 0, "FFCalExtended", true, true, false, false, true, 1, 1);
            NewsTime = false;
            if((MinutesUntilNextEvent <= MinsBeforeNews) || (MinutesSincePrevEvent <= MinsAfterNews))
               {
                  NewsTime = true;
               }
         }
      return(NewsTime);
   }
 
Try closing the terminal and then open it again.
 
have you changed the name of the indicator ? i saw that the is "FFCal extended.Alerts"
 
qjol:
have you changed the name of the indicator ? i saw that the is "FFCal extended.Alerts"

I renamed the .ex4 file to FFCalExtended before loading anything
 

deuce4884:

But since I want to call this indicator with an EA I've turned AllowWebUpdates to false and IsEA_Call to true.

 

i don't see that in your iCustom call

in the indicator "AllowWebUpdates" is the seventh parameter (see below)

extern bool     IncludeHigh             = true;   // 1
extern bool     IncludeMedium           = true;   // 2 
extern bool     IncludeLow              = true;   // 3 
extern bool     IncludeSpeaks           = true;   // 4

extern bool             IsEA_Call       = false;  // 5
extern int              OffsetHours     = 1;      // 6

extern bool             AllowWebUpdates = true;   // 7


and in your iCustom call you passing only 5 parameters


            int MinutesSincePrevEvent = iCustom(NULL, 0, "FFCalExtended", true, true, false, false, true, 1, 0);
            int MinutesUntilNextEvent = iCustom(NULL, 0, "FFCalExtended", true, true, false, false, true, 1, 1);
 
qjol:

i don't see that in your iCustom call

in the indicator "AllowWebUpdates" is the seventh parameter (see below)


and in your iCustom call you passing only 5 parameters




Thanks qjol. This is my first time working with anything like this so please excuse my ignorance. I've loaded them again and adjusted my iCustom call to pass 7 parameters as you mentioned. So far no errors. I'm going to keep an eye on it near the time of some news releasing and hopefully everything works according to plan (fingers crossed). Thanks again.
Reason: