The Last value for the offset index. 0 = currentbar. Same as Close, Value.
Declaration Syntax
Parameters
- barsAgo (Int32)
- Number of bars ago to return the Last value
Return Value
Returns the Last bar value for the offset index. 0 = current bar
Remarks
Not used during manual loop calculations
Examples
Example: plot the close for the current bar in a RealCode Indicator. On a daily bar interval it would be the close today.
Example: plot the close 5 bars ago. On a daily bar interval, it would be the close 5 days ago.
CopyVB.NET
plot = price.last() ' return the current close value
CopyVB.NET
plot = price.last(5) ' return the close 5 bars ago