using System;
namespace Krs.Ats.IBNet
{
///
/// Tick Price Event Arguments
///
[Serializable()]
public class TickPriceEventArgs : EventArgs
{
private bool canAutoExecute;
private decimal price;
private int tickerId;
private TickType tickType;
///
/// Full Constructor
///
/// The ticker Id that was specified previously in the call to reqMktData().
/// Specifies the type of price.
/// Specifies the price for the specified field.
/// specifies whether the price tick is available for automatic execution.
public TickPriceEventArgs(int tickerId, TickType tickType, decimal price, bool canAutoExecute)
{
this.tickerId = tickerId;
this.canAutoExecute = canAutoExecute;
this.price = price;
this.tickType = tickType;
}
///
/// Uninitialized Constructor for Serialization
///
public TickPriceEventArgs()
{
}
///
/// The ticker Id that was specified previously in the call to reqMktData().
///
public int TickerId
{
get { return tickerId; }
set { tickerId = value; }
}
///
/// Specifies the type of price.
///
public TickType TickType
{
get { return tickType; }
set { tickType = value; }
}
///
/// Specifies the price for the specified field.
///
public decimal Price
{
get { return price; }
set { price = value; }
}
///
/// specifies whether the price tick is available for automatic execution.
///
/// Possible values are:
/// 0 = not eligible for automatic execution
/// 1 = eligible for automatic execution
public bool CanAutoExecute
{
get { return canAutoExecute; }
set { canAutoExecute = value; }
}
}
}