Last


Summary

Access a value in the dataseries certain bars ago

Syntax

public double Last(int index)

Parameters

NameDescription

Example 1

double value = MarketSeries.Close.Last(5);
Print("The close price 5 bars ago was: {0}", value);

Example 2

double previousOpen = MarketSeries.Open.Last(1);
double previousClose = MarketSeries.Close.Last(1);
Print("Open: {0}, Close: {1}", previousOpen, previousClose);

Example 3

double currentClose = MarketSeries.Close.Last(0);
Print("Current Close: {0}", currentClose);