PDA

View Full Version : Closes[1][-1]


saltminer
07-15-2009, 04:24 AM
Hi guys,
I've just noticed that Closes[1][-1] works just fine in Historical, returning the true closing price for a barsarray that has not yet experienced its OnBarUpdate().
For example, in BarsInProgress==0, Closes[1][0] actually returns the value of the bar before the current one in BarsInProgress==0. This is documented and expected.
Yet Closes[1][-1] works just great! Yahoo! I wish I had known that several thousand lines of code ago.

My question is - is it safe to use?

Thanks,
saltminer

NinjaTrader_Dierk
07-15-2009, 05:01 AM
>> My question is - is it safe to use?
No it's not. It's definitely outside the specifications and thus may or may not work.