error in Icustom Indicator ? (remove my indicator )

 

i use custum indicator for zigzag in my scanner

   int    limit, bigshift=0;
   int GrossPeriod=60;
   int ExtDepth=12;
   int ExtDeviation=5;
   int ExtBackstep=3;
   int    counted_bars=IndicatorCounted();
//----
   if(counted_bars<0)
      counted_bars=0;
   if(counted_bars>0)
      counted_bars--;
   limit=Bars-counted_bars;
   double ExtMapBuffer1[];
   ArrayResize(ExtMapBuffer1,limit);
   for(int i=0; i<limit; i++)
      ExtMapBuffer1[i]=0;
   for(int i=0; i<limit; i++)
     {
      DebugBreak();
      ExtMapBuffer1[i]=iCustom(symbolName,0,"ZigZag",ExtDepth,ExtDeviation,ExtBackstep,0,bigshift);
      bigshift++;
     }
  

it work in first time but when i change time frame it show this error


2020.12.15 15:00:58.197 Custom indicator MyScanner EURUSD,H1: removed

2020.12.15 15:00:58.195 MyScanner EURUSD,H1: uninit reason 8

2020.12.15 15:00:58.195 MyScanner EURUSD,H1: not initialized

Step on New Rails: Custom Indicators in MQL5
Step on New Rails: Custom Indicators in MQL5
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.
 
MatlabCoder98:

i use custum indicator for zigzag in my scanner

it work in first time but when i change time frame it show this error


2020.12.15 15:00:58.197 Custom indicator MyScanner EURUSD,H1: removed

2020.12.15 15:00:58.195 MyScanner EURUSD,H1: uninit reason 8

2020.12.15 15:00:58.195 MyScanner EURUSD,H1: not initialized

Hello,

Do you have init code ?

Uninit reason 8 is

REASON_INITFAILED
 
8
 
This value means that OnInit() handler has returned a nonzero value
 
 
remcous:

Hello,

Do you have init code ?

Uninit reason 8 is

hi dear

thank you for replying

I have init() too

that it only initialize my scanner and show results for my watch list .

if i remove lines related to above function ( icustom box  )  . it does not show an error. therefore this error occures because of icustom only

 
MatlabCoder98:

hi dear

thank you for replying

I have init() too

that it only initialize my scanner and show results for my watch list .

if i remove lines related to above function ( icustom box  )  . it does not show an error. therefore this error occures because of icustom only

Have you picture of Zigzag inputs ?
 
remcous:
Have you picture of Zigzag inputs ?

no. i donot have any chart . i only a table full of indicators result such as  STOCH/RSI /MACD and fibo 

I WANT TO  add zigzag point to it.

 
MatlabCoder98:

no. i donot have any chart . i only a table full of indicators result such as  STOCH/RSI /MACD and fibo 

I WANT TO  add zigzag point to it.

I have try your code, even when I switch TF it's working very well. It's not iCustom the problem.

Can you show entire code ?

 
remcous:
Have you picture of Zigzag inputs ?

zigzag input

 
remcous:

I have try your code, even when I switch TF it's working very well. It's not iCustom the problem.

Can you show entire code ?

I agree with you . it work correctly but when i  switch TF it show screen without numbers and i should load my templete ( i make a template for this scanner)

i run code now and result is shown 

2020.12.15 21:44:52.057 Sources recompilation started

2020.12.15 21:43:41.253 Custom indicator ZigZag XAUUSD,H1: removed

2020.12.15 21:40:49.286 Custom indicator ZigZag EURUSD,H1: loaded successfully

2020.12.15 21:40:49.233 Custom indicator ZigZag XAUUSD,M30: loaded successfully

2020.12.15 21:40:49.217 Custom indicator ZigZag XAUUSD,M30: removed

2020.12.15 21:40:46.213 Custom indicator ZigZag XAUUSD,M30: loaded successfully

2020.12.15 21:40:46.203 Custom indicator ZigZag XAUUSD,M30: removed

2020.12.15 21:37:22.003 Custom indicator ZigZag XAUUSD,M30: loaded successfully

2020.12.15 21:37:21.990 Custom indicator ZigZag XAUUSD,M30: removed

2020.12.15 21:13:57.374 Custom indicator MyScanner EURUSD,H1: loaded successfully


 
MatlabCoder98:

I agree with you . it work correctly but when i  switch TF it show screen without numbers and i should load my templete ( i make a template for this scanner)

i run code now and result is shown 

2020.12.15 21:44:52.057 Sources recompilation started

2020.12.15 21:43:41.253 Custom indicator ZigZag XAUUSD,H1: removed

2020.12.15 21:40:49.286 Custom indicator ZigZag EURUSD,H1: loaded successfully

2020.12.15 21:40:49.233 Custom indicator ZigZag XAUUSD,M30: loaded successfully

2020.12.15 21:40:49.217 Custom indicator ZigZag XAUUSD,M30: removed

2020.12.15 21:40:46.213 Custom indicator ZigZag XAUUSD,M30: loaded successfully

2020.12.15 21:40:46.203 Custom indicator ZigZag XAUUSD,M30: removed

2020.12.15 21:37:22.003 Custom indicator ZigZag XAUUSD,M30: loaded successfully

2020.12.15 21:37:21.990 Custom indicator ZigZag XAUUSD,M30: removed

2020.12.15 21:13:57.374 Custom indicator MyScanner EURUSD,H1: loaded successfully



I don't think iCustom is the problem.

maybe you don't want show us code, it's understandable...

 
remcous:


I don't think iCustom is the problem.

maybe you don't want show us code, it's understandable...


please check private message 

god bless you

Files:
MyScan.mq4  42 kb
Reason: