Volume of Ticks for Bid/Ask based Historical data, or volume of Trades for Trade based Historical data.


SYNTAX


public double Volume ()


RETURN


double Returns a double value representing the volume of the referenced element.


EXAMPLE


The following example references and displays the value of the last bar Volume by selected on chart instrument:

// Example #1
BarData instr_history = (BarData)CurrentData;
Print(instr_history.Volume());

 The following example references and displays the value of the last bar Volume by specified instrument:

// Example #2
Instrument eurusd = Instruments.GetInstrument("EUR/USD");
BarData  eurusd_history= (BarData)GetHistoricalData(new HistoricalDataRequest(eurusd, 1));
Print("EUR/USD Volume: " + eurusd_history.Volume());