iCustom stops getting buffer values

Back to topics list To post a new topic, please log in or register
avatar
215
buju 2016.02.10 23:13
 

Hi there

Im using icustom to get the values from a indicator , but after some time it stops getting the values.

here is the code Im using.

any suggestions would be wecome.

thanks







//------------------------x-----------------------
int start()
  {

   value0 = iCustom(NULL,0,"Ultimate",0,0,0);  // for Ultimate
   value1 = iCustom(NULL,0,"Ultimate",0,1,0);   // for Ultimate
   
  // gle = GetLastError();
  // if (gle > 0) Alert("Problem with Ultimate Indicator,check if file exists ",gle);
   


______________________________________________
Indicator
---------------
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Yellow
#property indicator_width1 5
#property indicator_color2 Magenta
#property indicator_width2 5
//---- indicator parameters
extern int ExtDepth=115;//105;//21;
extern int ExtDeviation=130;//120;//24;
extern int ExtBackstep=80;//80;//70;//14;
//---- indicator buffers
double ZigZagUp[];
double ZigZagDown[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   IndicatorBuffers(2);
//---- drawing settings
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0, 233);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1, 234);
//---- indicator buffers mapping
   SetIndexBuffer(0,ZigZagUp);
   SetIndexBuffer(1,ZigZagDown);
  // SetIndexEmptyValue(0,0.0);
  // SetIndexEmptyValue(1,0.0);     
//---- indicator short name
   IndicatorShortName("ZigZag("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");
//---

 

avatar
Moderator
3418
GumRai 2016.02.10 23:36 #
 

Show your code properly with start, init and globalscope separated. As it is you have start with no closing "}".

Show how you know that iCustom is not returning a value. 

Back to topics list  

To add comments, please log in or register