Thanks for a great community and collection of information.
I'm sure what I'm trying to do is very simple to you all....
I am simply trying to reference the Hidden divergences (long and short) + Real divergences (long and short) from the indicator ECIDiv_V4 for use in a strategy. Note: when set to calculate on bar close you get the arrow coming up 2 bars ago.
I created a public dataseries in the indicator and set numbers -2,-1,1,2 for each divergence and else make it 0. I then just tried to print those numbers when running a strategy but just get 0s in output window + 'Error on calling 'OnBarUpdate' method for indicator 'ECIDiv_V4' on bar 20: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.'
I'm new to programming and spent a long time trying to work it out myself but no luck!