GetValueAt()
GetValueAt()
Definition
Returns the underlying input value at a specified bar index value.
Method Return Value
A double value representing the value at a specified bar.
Syntax
GetValueAt(int barIndex)
ISeries\<t\>.GetValueAt(int barIndex)
If called directly from the instance of the NinjaScript object, the value which is returned corresponds to the input series the object is running. (e.g., Close, High, Low, SMA, etc.). If you’re attempting to obtain another indicator value, you will need to pull this from the calculated indicator Value or Plot:
SMA(20).GetValueAt(123); // bar value
SMA(20).Values[0].GetValueAt(123); // indicator value
(Input as Indicator).Values[0].GetValueAt(123) // passed in indicator value

