Calling Zigzag indicator from inside a product but fail in the recent product test

 

I am posting an update to one of my products.

In this product, it made a call "ZZ_M1=iCustom(NULL,TFMigrate(PERIOD_M1),"Examples\\ZigZag");"

This statement used to work in the past, but it now seems that ZigZag is no longer included in the product testing environment.

This is the error, "2016.05.01 00:00:00 cannot load custom indicator 'Examples\ZigZag' [4802]"

How should I code such that I can pass the test?


I have contacted the service support, but they couldn't help me resolve my problem and want this to go into the forum to be answered.

 
Zee Zhou Ma:

I am posting an update to one of my products.

In this product, it made a call "ZZ_M1=iCustom(NULL,TFMigrate(PERIOD_M1),"Examples\\ZigZag");"

This statement used to work in the past, but it now seems that ZigZag is no longer included in the product testing environment.

This is the error, "2016.05.01 00:00:00 cannot load custom indicator 'Examples\ZigZag' [4802]"

How should I code such that I can pass the test?

I have contacted the service support, but they couldn't help me resolve my problem and want this to go into the forum to be answered.

You are supposed to embed any custom indicators you wish to use and not depend on the "environment"! See the resources documentation.
 
I see. Thanks. Have a nice day.
 

Okay so now my code is this:

#resource "\\Indicators\\Examples\\ZigZag.ex5"

ZZ_M1=iCustom(NULL,TFMigrate(PERIOD_M1),"::\\Indicators\\Examples\\ZigZag.ex5");

   if(ZZ_M1==INVALID_HANDLE)

     {

      Print("iCustom call: Error code=",GetLastError());

      return(INIT_FAILED);

     }

It compiles correctly, but gets an error here during running:

2018.10.17 22:26:36.261 XXX (EPZ18,M1) cannot load custom indicator 'C:\Users\XXX\AppData\Roaming\MetaQuotes\Terminal\870072DB5DBAB61841BAE146AFAAFB8A\MQL5\Indicators\XXX.ex5::\Indicators\Examples\ZigZag.ex5' [4802]


Pardon me if I am not good at reading the documentation.

I have dug the forum for clues, but still having no idea.

Need someone to enlighten me on how to go about doing it correctly.

Thanks



 

if it compiles correctly then your custom indicator not in the right place


'C:\Users\XXX\AppData\Roaming\MetaQuotes\Terminal\870072DB5DBAB61841BAE146AFAAFB8A\MQL5\Indicators\XXX.ex5::\Indicators\Examples\ZigZag.ex5' [4802]


 

I am sorry, I don't quite understand. 

ZigZag indicator is provided by MQL5 and has always been located in Examples folder.

And I believe the custom indicator should reside in \MQL5\Indicators. 

So where should my custom indicator be located in?

Please give some examples. 

 
https://www.mql5.com/en/forum/4061
Error 4802 - cannot load custom indicator
Error 4802 - cannot load custom indicator
  • 2011.06.30
  • www.mql5.com
I am stuck with this error 4802. When I try to get value of the custom indicator handle CustomIndicatorHandle=iCustom...
 
The product has passed test validation. Thanks guys.
Reason: