icustom problem

 

hi guys

i use this indicator <Deleted>

for icustom, but print zero (0) for me

help me for solve this problem

thnaks

my code :

//+------------------------------------------------------------------+
//|                                               zigzad customm.mq4 |
//|                        Copyright 2017, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
input int PeriodZigzag = 14;
//input int x = 3;
//------------------------------------------------------+
void OnTick()
  {
//---
   double a=iCustom(NULL,0,"\\Market\\<Deleted>.ex4",PeriodZigzag,4,0);
   if(a<Close[0])
     {
     Print(a);
Comment(a);
SendNotification(_Symbol+" Buy "+a); 
     }
      if(a>Close[0])
        {
SendNotification(_Symbol+" Sell "+a); 
        }

  }
//+------------------------------------------------------------------+
 
aliebnehoseini:

hi guys

i use this indicator <Deleted>

for icustom, but print zero (0) for me

help me for solve this problem

thnaks

my code :

You can try a couple of things. 

Have you the directory right for the indicator  \\Market etc  ?  Do other iCustom indicators return correct values?

If the indicator is any kind of zigzag, its a bit tricky, standard ZigZag returns mostly zeros unless theres a change in direction.

As an example, this code should display all the iCustom values of standard zigzag for the last 20 bars - most will be zeros.

So long as there is a change in zigzag then it will show price at that bar only.

string txt="";
for(int y=0;y<20;y++){  // bars
 txt=StringConcatenate(txt,"\n",y," ");
 for(int x=0;x<7;x++)   // indicator values at bar 
  txt=StringConcatenate(txt,iCustom(Symbol(),Period(),"ZigZag",20,5,3,x,y)," ");
}
Comment(txt);
Reason: