double close = Close[0]; double close1 = Close[1];
- CurrentBar = 16507
- Count = 16508
- The first line does execute, but to my surprise it returns information for the oldest bar in the array (the one you see when the chart is scrolled all the way to the left)
- The second line throws an ArgumentOutOfRangeException that says " Index was out of range. Must be non-negative and less than the size of the collection."
- The same thing happens with the other standard arrays (Open, High, Low, Volume)
- The same thing happens if I address it as Close[0][1]
It is as if NT was trying to index back from zero, rather than from CurrentBar. That would explain the error message -- subtracting the BarsAgo value from zero, rather than from CurrentBar would certainly cause a negative index.
I then tried an explicitly negative index to see whether that would index forward (zero minus a negative would give a positive index value) and stay in the array. That got a legitimate exception, evidently from NT array access error checking that said " 'barsAgo' needed to be between 0 and 16507 but was -1"
This looks to me like an NT bug. Accessing the standard arrays from OnMouseMove() worked in NT7 -- I used it to display some information helpful to a developer. So far, though, it appears to fail in NT8.
--EV
Comment