EA uses Indicator as resource and this indicator also has resources

 

Hi

 Actually I am using a EA who calls a indicator using ICustom and ChartIndicatorAdd function, so I would like to have only one .ex5 program. But This indicator also has images as resources, so I have a problem because the resources from indicator does not work when are called from EA:


Calling Indicator from EA:

   //EA Calling Indicator

  int IndicHandle=INVALID_HANDLE; 
  int subwindow=(int)ChartGetInteger(0,CHART_WINDOWS_TOTAL); 
  IndicHandle=iCustom(_Symbol,_Period,"::Indicators\\Template\\RazopFisherBot.ex5");//"::Indicators\\Template\\RazopFisherBot.ex5"
  long  chart_ID =ObjectGetInteger(ChartID(),_Symbol,OBJPROP_CHART_ID); 
  ChartIndicatorAdd(chart_ID,0,IndicHandle);

But the Indicator has resources and they are not working

//resouce from Indicator
#include "Controls\SeparateLine.mqh"

Run the EA the indicato write this message:

2018.10.25 00:13:19.025 RazopFisherBot.ex5::Indicators\Template\RazopFisherBot (PETR4,H1) CCanvas::Attach::Indicators\Template\RazopFisherBot.ex5::RazopFisherBot_separate_line_0__11424

When I put manually the EA and Indicator it works normally 

I also analysed this and used topic and tried every combinations  https://www.mql5.com/en/articles/261 (Working with custom indicators included as resources)

but no luck.

Someone has some idea?

Use of Resources in MQL5
Use of Resources in MQL5
  • www.mql5.com
Long ago the main purpose of computer programs was doing heavy mathematical calculations and processing large amounts of data. But with the increased power of computers, priorities has changed. Now, between two programs with identical functionality, a user chooses the one that is easier to work with. Nowadays it is not enough to write a program...
 
Solved!
 
ericsebestyen:
Solved!
Really helpful for others with the same problem.
 

Alain Verleyen

Ok, Just to comment the problem and help others, my problem was because the resources can't be on a location with a large name, I don' t know exactly how large can be the folder address like C:/Path1/pah2/path3..., I moved to just a single forder and it was solved...

Reason: