Why I get Empty Value Printed of an indicator buffer after shift value of iCustom?

 

Hello,

I am getting a strange issue with a custum indicator I have to work with.
I want to print the value of one buffer of the indicator I am using for the EA I am coding, but as shown in attached image, I get empty value number after 2 candles which is right the value I use in iCustom function for the shift.
If I use a simpler indicator with just a "For" loop I get printed the right values, but with this indicator I am working with I get empty valuse after just 2 candles.
Can someone please explain me why I have this problem? I am hitting the head on the wall for days.

This is the iCustum call I am using in the EA:

Print(iCustom(_Symbol,_Period, "Indicator","alerts settings",true,true,false,false,false,true,"Indicator arrows",Lime,Red,9,1)); 

This is the simple For loop I am using in the indicator after Start() to test the indicator buffer reading with iCustum:

  

 int    counted_bars=IndicatorCounted();

//----

      int i = 0;

      for(i = Bars; i >= 0; i--) {

          ExtMapBuffer1[i] = High[i] + 0.01;

          ExtMapBuffer2[i] = Low[i] - 0.02;

      }

The indicator I am using is doing repaint, is there an issue with repaint indicators that can give this print of empty value after some candles?

 
Your iCustom is reading the tenth buffer. Your posted code only has two. Why do you not expect EMPTY_VALUE?
 
William Roeder:
Your iCustom is reading the tenth buffer. Your posted code only has two. Why do you not expect EMPTY_VALUE?
Hi William, cause somewhere I read that now we can have more than 8 buffers and that indicator with those two test buffer reached 10 buffers in total, I tryed also to use the first buffers and remove those 2 for testing and I get the same issue. It return EMPTY_VALUE after 2 candles, is really weird.
 

Yes you can have more than 8 buffers. Your posted code only has two.

It's only weird to you because you don't understand the problem.

We can't help because we can't see your broken code. There are no mind readers here and our crystal balls are cracked.

 
I found out that I cannot get values out of icustum in backtesting, in realtime works very well!
 
M4STR0: I found out that I cannot get values out of icustum in backtesting, in realtime works very well!
  1. Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.
 
M4STR0:
I found out that I cannot get values out of icustom in backtesting, in realtime works very well!

Are you trying to use iCustom with a symbol other than the symbol being tested?

If you expect and answer, give more information.

Reason: