I have the following code
int barOffset = barOffset = (Historical || CalculateOnBarClose) ? 0 : 1;
Print(barsBack + " " + open[barOffset] + " " + high[barOffset] + " " + low[barOffset] + " " + close[barOffset] + " " + close[0] + " " + time[barOffset] + " " + Time[0]);
I am passing in several IDataSeries and an ITimeSeries and all the values are as expected except Time[0].
I thought that would give me the current time of the primary bar whereas it is giving me the time the current secondary bar will end.
I put the test indicator, which calls a UserDefinedMethod on a 5 tick range bar chart (6E). Because the times of the data series won't be even multiples of each other (3 minutes and 5 tick range), I want to make 100% certain I understand the nuances of how the data is handled.
So if it is 1344 and the last 3 minute bar is 1342, as expected, I get the OHLC of that bar along with the time 1342.
But as I mentioned above, I expected to get the time of the current bar in the range chart where the indicator is.
Any idea where I have the misunderstanding? Alternatively, if I wanted the time from a given bar on the primary chart, how would I code that?
Comment