using System; namespace Krs.Ats.IBNet { /// /// Historical Data Event Arguments /// [Serializable()] public class HistoricalDataEventArgs : EventArgs { private decimal close; private int trades; private DateTime date; private bool hasGaps; private decimal high; private decimal low; private decimal open; private int requestId; private int volume; private double wap; private int recordNumber; private int recordTotal; /// /// Full Constructor /// /// The ticker Id of the request to which this bar is responding. /// The date-time stamp of the start of the bar. /// The format is determined by the reqHistoricalData() formatDate parameter. /// Bar opening price. /// High price during the time covered by the bar. /// Low price during the time covered by the bar. /// Bar closing price. /// Volume during the time covered by the bar. /// When TRADES historical data is returned, represents the number of trades that /// occurred during the time period the bar covers. /// Weighted average price during the time covered by the bar. /// Whether or not there are gaps in the data. /// Current Record Number out of Record Total. /// Total Records Returned by Historical Request. public HistoricalDataEventArgs(int requestId, DateTime date, decimal open, decimal high, decimal low, decimal close, int volume, int trades, double wap, bool hasGaps, int recordNumber, int recordTotal) { this.requestId = requestId; this.hasGaps = hasGaps; this.wap = wap; this.trades = trades; this.volume = volume; this.close = close; this.low = low; this.high = high; this.open = open; this.date = date; this.recordNumber = recordNumber; this.recordTotal = recordTotal; } /// /// Uninitialized Constructor for Serialization /// public HistoricalDataEventArgs() { } /// /// The ticker Id of the request to which this bar is responding. /// public int RequestId { get { return requestId; } set { requestId = value; } } /// /// The date-time stamp of the start of the bar. /// The format is determined by the reqHistoricalData() formatDate parameter. /// public DateTime Date { get { return date; } set { date = value; } } /// /// Bar opening price. /// public decimal Open { get { return open; } set { open = value; } } /// /// High price during the time covered by the bar. /// public decimal High { get { return high; } set { high = value; } } /// /// Low price during the time covered by the bar. /// public decimal Low { get { return low; } set { low = value; } } /// /// Bar closing price. /// public decimal Close { get { return close; } set { close = value; } } /// /// Volume during the time covered by the bar. /// public int Volume { get { return volume; } set { volume = value; } } /// /// When TRADES historical data is returned, represents the number of trades that /// occurred during the time period the bar covers. /// public int Trades { get { return trades; } set { trades = value; } } /// /// Weighted average price during the time covered by the bar. /// public double Wap { get { return wap; } set { wap = value; } } /// /// Whether or not there are gaps in the data. /// public bool HasGaps { get { return hasGaps; } set { hasGaps = value; } } /// /// Current Record Number out of Record Total /// public int RecordNumber { get { return recordNumber; } set { recordNumber = value; } } /// /// Total records returned by query /// public int RecordTotal { get { return recordTotal; } set { recordTotal = value; } } } }