calling custom indicator inside bot/ea through resources that has nested custom indicator - page 2

 
Arturo Lopez Perez:

I understand this post is very old, but I face the same problem.

Works in the tester, but when dragged to a chart...

Any idea why?

Thanks

Works in the tester ?

Which MT4 build ? Is Heiken_Ashi_Smoothed.ex4 also contains resource ?

 
Alain Verleyen:

Works in the tester ?

Which MT4 build ? Is Heiken_Ashi_Smoothed.ex4 also contains resource ?

The build is the latest build. Nothing unusual. The indicator does not contain a resource. In the tester it works. When dragged to a chart, it fails.
 
Arturo Lopez Perez:
The build is the latest build. Nothing unusual. The indicator does not contain a resource. In the tester it works. When dragged to a chart, it fails.
Weird. Contact the ServiceDesk.
 

Apparently the problem persists...

I've reread the doc, recheck all options but still it doesn't work for very strange reasons sometimes

- like adding the Libraries directory in the indicator path as mentioned in a previous post

- or if you work with providing a path to avoid this then the load module is required in the directory for the execution!

If someone has found the solution for using indicators as resource, let us know

 
Michael Sarikas: its not the location of the folder the .ex4 files are in the correct places,
That tells us nothing, except that you think they are in the correct place.
Alain Verleyen: Please show the relevant code, as already asked. In which directory are your source(s) code ?

If you want help, answer the questions asked.

 

previous post :

skeezwiz:

04:52:47 cannot load resource 'C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\GUID\MQL4\Libraries\::Indicators\indi4.ex4::Indicators\indi4.ex4'


\Librariies\   is added by MT4, WHY? Why MT4 is suddenly looking into this directory?  

  skeezwiz was having another problem as the '\::Indicators\indi4.ex4' was in double too. 


 
jacques366:

Apparently the problem persists...

I've reread the doc, recheck all options but still it doesn't work for very strange reasons sometimes

- like adding the Libraries directory in the indicator path as mentioned in a previous post

- or if you work with providing a path to avoid this then the load module is required in the directory for the execution!

If someone has found the solution for using indicators as resource, let us know


If you could attach a small test indicator (in sources) which reproduces the problem, this could significantly enlarge your chances to get help from others.

I have indicators' resources called from indicators' resources called from EAs, and it works.
 
Arturo Lopez Perez:

I understand this post is very old, but I face the same problem.

Works in the tester, but when dragged to a chart...

Any idea why?

Thanks

Works for me

Used code to test :

#property  indicator_chart_window
#property  indicator_buffers 0
#property  indicator_plots   0
#property  strict
#resource "\\Indicators\\Heiken_Ashi_Smoothed.ex4"

//
//
//
//
//

extern int MaMetod  = 2;
extern int MaPeriod = 6;
extern int MaMetod2  = 3;
extern int MaPeriod2 = 2;

int init()   { return(0); }
int deinit() { return(0); }
int start()
{
   Comment(GetHeikenAshiTrend(0)); 
   return(0);
}


/**
* Checks direction of Heiken Ashi Smoothed
* @return   int
*/

int GetHeikenAshiTrend(int shift)
{
   double open  = iCustom(Symbol(), 0, "::Indicators\\Heiken_Ashi_Smoothed.ex4", MaMetod, MaPeriod, MaMetod2, MaPeriod2, 4, shift);
   double close = iCustom(Symbol(), 0, "::Indicators\\Heiken_Ashi_Smoothed.ex4", MaMetod, MaPeriod, MaMetod2, MaPeriod2, 5, shift);
   if(close > open) return(OP_BUY);
   return(OP_SELL);
}

But I used the attached ha smoothed - try it, maybe your version is the issue (since the original needs some changes in the code)

Files:
 
Alain Verleyen:

In both indi3 and your EA.


Hi, I tryed to implement an embedded indicator the same way. The only difference is that my indicator is intended to be displayed in a separate window. My problem is that the indicator is not displayed at all. I want it to be automatically loaded and displayed by the EA.

Is it possible to have an indicator resource displayed in a separate window?? 


Any suggestion will be welcome,

Thanks in advance.

 
Andre Tavares:

Hi, I tryed to implement an embedded indicator the same way. The only difference is that my indicator is intended to be displayed in a separate window. My problem is that the indicator is not displayed at all. I want it to be automatically loaded and displayed by the EA.

Is it possible to have an indicator resource displayed in a separate window?? 


Any suggestion will be welcome,

Thanks in advance.

iCustom() is not intended to show the indicator on chart

ChartIndicatorAdd() does that - but only in metatrader 5

Reason: