Gets the last value of this DataSeries.


The last value may represent one of the values of the last bar of the market series, e.g. Open, High, Low and Close. Therefore, take into consideration that on each tick, except the Open price, the rest of the values will most probably change.


public double LastValue{ get; }

Example 1

protected override void OnTick()
    double lastValue = MarketSeries.Close.LastValue;
    Print("The last value of MarketSeries.Close Series is: {0}", MarketSeries.Close.LastValue);
    // Property LastValue has an accessor but no setter, i.e. LastValue can be retrieved but not set.
    // The following code will produce an error
    MarketSeries.Close.LastValue = 100;