Reading buffer value

 

I have an indicator that I'm using iCustom to feed an EA.  I can get the value from Buffer 0, seen below with a value of 1.  But when I go back more than 500 bars, even though I see a value of 1 in the date window, the value it returns in iCustom is EMPTY_VALUE.  So I thought maybe it was stored in a hidden buffer.  So i cycled through all 512 buffers and didn't find the value.  

So somehow the indicator shows a bar in the indicator window;  Shows a 1 in the data window.  But when I get the value in iCustom, it is empty value.  It returns the correct value up to bar 500. Then returns empty value.

So my question is how can the indicator place a bar on the chart and a 1 in the data window, but return EMPTY_VALUE in iCustom.  How do I get a valid value to return to my EA?


I don't have access to the source code or I could find it.


any help is appreciated


thanks




 
cre8able:

I have an indicator that I'm using iCustom to feed an EA.  I can get the value from Buffer 0, seen below with a value of 1. 

But when I go back more than 500 bars, even though I see a value of 1 in the date window, the value it returns in iCustom is EMPTY_VALUE.  So I thought maybe it was stored in a hidden buffer. 

So somehow the indicator shows a bar in the indicator window;  Shows a 1 in the data window. 

So my question is how can the indicator place a bar on the chart and a 1 in the data window, but return EMPTY_VALUE in iCustom.  How do I get a valid value to return to my EA?

  1. Your image shows a one in buffer zero at 20.08.07 08:05 We have no idea what bar index that is.
  2. You mean DATA window.
         How To Ask Questions The Smart Way. 2004
              Be precise and informative about your problem

    Unlikely. Very few indicators have hidden buffers. I only use a hidden buffer (zero) for the value and 1,2,3 for the colors on colored lines so a hover over a line will show the price.

  3. The indicator shows a histogram, not a bar. See №1.
  4. It doesn't. On the bar you showed, it shows a green histogram, likely buffer zero. If it shows another color on another bar, that has nothing to do with buffer zero, and you will read out EMPTY_VALUE out of buffer zero.