AlohaBob
01-06-2007, 08:49 PM
In a custom indicator, I cannot access a value 1 bar ago. For example EMA(13)[1] will not print to the output window and causes the indicator not to work at all.
I thought maybe you couldn't refer to bars ago on indicators, so I set up a DataSeries to keep the values and that doesn't work either.
In both cases, if you refer to a value 1 bar ago, the value will not print and causes the indicator to totally fail (i.e. nothing printed to output window, doesn't plot on chart, and doesn't show up in databox). As soon as you take the reference to 1 bar ago out, it works perfectly.
I created a simple test program that shows the behaviour and is basically the same as the one shown in documenation on DataSeries. The program is attached. I can send you screen shots as well if needed.
Building this indicator is critical to a strategy I'm developing, so I'd appreciate any possible escalation on either fixing this if it's a bug or letting me know what I'm doing wrong.
Best regards,
Bob
I thought maybe you couldn't refer to bars ago on indicators, so I set up a DataSeries to keep the values and that doesn't work either.
In both cases, if you refer to a value 1 bar ago, the value will not print and causes the indicator to totally fail (i.e. nothing printed to output window, doesn't plot on chart, and doesn't show up in databox). As soon as you take the reference to 1 bar ago out, it works perfectly.
I created a simple test program that shows the behaviour and is basically the same as the one shown in documenation on DataSeries. The program is attached. I can send you screen shots as well if needed.
Building this indicator is critical to a strategy I'm developing, so I'd appreciate any possible escalation on either fixing this if it's a bug or letting me know what I'm doing wrong.
Best regards,
Bob