Bounded resource on validation of the EA for market will not be found

 

Hello,

I am trying to validate my EA for market, but each time I became an error, but in my system in on other systems it works fine. I think it is a problem of the test system if mql or have someone an idea what I'm doing wrong?

I used an article for resource binding in mql: https://www.mql5.com/de/articles/261

test on EURUSD,H1
 2016.04.01 00:00  cannot load 'MQL4\Experts\MY_EA_NAME__1.ex4::Indicators\MY_INDICATOR_NAME.ex4'
Verwendung von Ressourcen in MQL5
Verwendung von Ressourcen in MQL5
  • 2016.01.15
  • MetaQuotes Software Corp.
  • www.mql5.com
MQL5 Programme automatisieren nicht nur Routineberechnungen, sondern können auch vollfunktionale graphische Umgebungen erzeugen. Die Funktionen zur Erzeugung wirklich interaktiver Kontrollen sind nun virtuell genauso vollwertig wie in in klassischen Programmiersprachen. Wenn Sie ein voll funktionsfähiges, eigenständiges Programm in MQL5 schreiben wollen, dann sollten Sie seine Ressourcen verwenden. Programme mit Ressourcen sind leichter zu pflegen und zu verbreiten.
 
From yesterday
 
honest_knave:
From yesterday


Funny, but there is no answer on this question... It seems that the problem lies on the path:

Not 'MQL4\Experts\MY_EA_NAME__1.ex4::Indicators\MY_INDICATOR_NAME.ex4' but '\Experts\MY_EA_NAME__1.ex4::Indicators\MY_INDICATOR_NAME.ex4' !

In the article stands, that the path should be without MQL4, but test system seams not to knowing that...

 

Looks like that in the article in the function is an error:


string GetRelativeProgramPath()
  {
   int pos2;
//--- get the absolute path to the application
   string path=MQLInfoString(MQL_PROGRAM_PATH);
//--- find the position of "\MQL4\" substring
   int    pos =StringFind(path,"\\MQL4\\");
//--- substring not found - error
   if(pos<0)
      return(NULL);
//--- skip "\MQL4" directory <== DO NOT SKIP MQL4 DIRECTORY!
   pos+=0;
//--- skip extra '\' symbols
   while(StringGetCharacter(path,pos+1)=='\\')
      pos++;
//--- if this is a resource, return the path relative to MQL4 directory
   if(StringFind(path,"::",pos)>=0)
      return(StringSubstr(path,pos));
//--- find a separator for the first MQL4 subdirectory (for example, MQL4\Indicators)
//--- if not found, return the path relative to MQL4 directory
   if((pos2=StringFind(path,"\\",pos+1))<0)
      return(StringSubstr(path,pos));
//--- return the path relative to the subdirectory (for example, MQL4\Indicators)
   return(StringSubstr(path,pos2+1));
  }
Reason: