ref(-1) will return null for the oldest bar on the chart, which is typical. The only reason I can think of for it to return null when the bar index = -1 is that the indicator study didn't return a value to eSignal. For my indicators this doesn't happen....
G,
Thanks but my indicator did have a value at -1. What was strange is that it only happens AFTER getCurrentBarIndex() > -2 and setComputeOnClose() is called from the Premain. If setComputeOnClose() is not called I get values for ref(-1)... go figure
Bob
Originally posted by gspiker ref(-1) will return null for the oldest bar on the chart, which is typical. The only reason I can think of for it to return null when the bar index = -1 is that the indicator study didn't return a value to eSignal. For my indicators this doesn't happen....
Comment