Volume ()
method
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());
Discussion
Join PTMC community to post your comments
No comments yet. Be the first.
BarData methods
- BeginLoad (DateTime from, DateTime to)
- BeginLoad (DateTime from)
- BeginLoad (DateTime from, DateTime to, HistoricalDataLoadParams historicalDataLoadParams)
- Close (int offset)
- Close ()
- FindInterval (DateTime time)
- FindInterval (DateTime time, int from, int to)
- GetPrice (PriceType priceType, int offset)
- GetPrice (PriceType priceType)
- High (int offset)
- High ()
- Highest (PriceType type, int start, int count)
- Highest (PriceType type)
- Load (DateTime from, DateTime to)
- Load (DateTime from)
- Load (DateTime from, DateTime to, HistoricalDataLoadParams historicalDataLoadParams)
- Low (int offset)
- Low ()
- Lowest (PriceType type, int start, int count)
- Lowest (PriceType type)
- Medium (int offset)
- Medium ()
- Open (int offset)
- Open ()
- Range (int offset)
- Range ()
- Time (int offset)
- Time ()
- TimeClose (int offset)
- TimeClose ()
- TimeOpen (int offset)
- TimeOpen ()
- TrueRange (int offset)
- TrueRange ()
- Typical (int offset)
- Typical ()
- Volume (int offset)
- Weighted (int offset)
- Weighted ()
BarData properties
BarData events