Using a 1S interval chart, I noticed that with setComputeOnClose(), getCurrentBarIndex() returns -1 for the current bar? I thought it should be zero.
I also noticed that without using setComputeOnClose(), so that there is intrabar data, getCurrentBarIndex() returns 0 when the bar state is BARSTATE_NEWBAR.
Is this the way it should work? It sounds inconsistent to me. I didn't do detailed testing, but one of my formulas uses intrabar data, and the other does not, and I noticed that difference.
I also noticed that without using setComputeOnClose(), so that there is intrabar data, getCurrentBarIndex() returns 0 when the bar state is BARSTATE_NEWBAR.
Is this the way it should work? It sounds inconsistent to me. I didn't do detailed testing, but one of my formulas uses intrabar data, and the other does not, and I noticed that difference.
Comment