Urgent help required.

 

hey buddies!

            I was working on a Custom indicator and the indicator itself is working pretty fine. But when i Call iCustom function, the output values are different from the values shown in the Data Window.

 Should i have to put the  extern Inputs inside the code as i am selecting Them through pop-up window in terminal.

It is something strange and i think i am missing something important and small.
  Custom indicator is attached.

  This is how i am using the Icustom function.

double Custom8 = NormalizeDouble( iCustom(NULL,PERIOD_CURRENT,"bb_stops_rsi_super_smooth",1,0),Digits) ;

   If you face this issue in your whole Coding experience and know what is wrong. Please Share your valuable feedback.

Files:
 
assfianazhar:

hey buddies!

            I was working on a Custom indicator and the indicator itself is working pretty fine. But when i Call iCustom function, the output values are different from the values shown in the Data Window.

 Should i have to put the  extern Inputs inside the code as i am selecting Them through pop-up window in terminal.

It is something strange and i think i am missing something important and small.
  Custom indicator is attached.

  This is how i am using the Icustom function.

   If you face this issue in your whole Coding experience and know what is wrong. Please Share your valuable feedback.

extern are missing, check iCustom fonction

ustom8 = NormalizeDouble( iCustom(NULL,PERIOD_CURRENT,"bb_stops_rsi_super_smooth", EXTERNS, 1,0),Digits) ;
 
ffoorr:

extern are missing, check iCustom fonction

Please change this code

///////////

   SetIndexEmptyValue(3,0.0);

   SetIndexEmptyValue(4,0.0);

   SetIndexEmptyValue(5,0.0);

   SetIndexEmptyValue(6,0.0);

   

   ///////////


int init()
{
   IndicatorBuffers(13);
   SetIndexBuffer(0, rsi);
   SetIndexBuffer(1, rsida);
   SetIndexBuffer(2, rsidb);
   SetIndexBuffer(3, bblu);     SetIndexStyle(3,DRAW_ARROW,EMPTY,BBUpDotSize,BBUpDotColor); SetIndexArrow(3,159);
   SetIndexBuffer(4, bbld);     SetIndexStyle(4,DRAW_ARROW,EMPTY,BBDnDotSize,BBDnDotColor); SetIndexArrow(4,159);
   SetIndexBuffer(5, upa);      SetIndexStyle(5,DRAW_ARROW,EMPTY,BBUpDotSize,BBUpDotColor); SetIndexArrow(5,108);
   SetIndexBuffer(6, dna);      SetIndexStyle(6,DRAW_ARROW,EMPTY,BBDnDotSize,BBDnDotColor); SetIndexArrow(6,108);
   ///////////
   SetIndexEmptyValue(3,0.0);
   SetIndexEmptyValue(4,0.0);
   SetIndexEmptyValue(5,0.0);
   SetIndexEmptyValue(6,0.0);
   
   ///////////
   
   
   SetIndexBuffer(7, amax);
   SetIndexBuffer(8, amin);
   SetIndexBuffer(9, bmax);
   SetIndexBuffer(10,bmin);
   SetIndexBuffer(11,trend);
   SetIndexBuffer(12,slope);
    
   IndicatorShortName("bb stops of "+getRsiName((int)RsiMethod)+" super smoother ("+(string)RsiPeriod+","+(string)RsiSmoothing+")");
return(0);
}