using System; namespace Krs.Ats.IBNet { /// /// Tick Option Computation Event Arguments /// [Serializable()] public class TickOptionComputationEventArgs : EventArgs { private double delta; private double impliedVol; private double optionPrice; private double pvDividend; private int tickerId; private double gamma; private double vega; private double theta; private double underlyingPrice; private TickType tickType; /// /// Full Constructor /// /// The ticker Id that was specified previously in the call to reqMktData(). /// Specifies the type of option computation. /// The implied volatility calculated by the TWS option modeler, using the specificed ticktype value. /// The option delta calculated by the TWS option modeler. /// The model price. /// Present value of dividends expected on the option’s underlier. /// Gamma /// Vega /// Theta /// Underlying Price public TickOptionComputationEventArgs(int tickerId, TickType tickType, double impliedVol, double delta, double optionPrice, double pvDividend, double gamma, double vega, double theta, double undPrice) { this.tickerId = tickerId; this.pvDividend = pvDividend; this.delta = delta; this.optionPrice = optionPrice; this.impliedVol = impliedVol; this.tickType = tickType; this.gamma = gamma; this.vega = vega; this.theta = theta; this.underlyingPrice = undPrice; } /// /// Uninitialized Constructor for Serialization /// public TickOptionComputationEventArgs() { } /// /// 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 option computation. /// /// public TickType TickType { get { return tickType; } set { tickType = value; } } /// /// The implied volatility calculated by the TWS option modeler, using the specificed ticktype value. /// public double ImpliedVol { get { return impliedVol; } set { impliedVol = value; } } /// /// The option delta calculated by the TWS option modeler. /// public double Delta { get { return delta; } set { delta = value; } } /// /// The Option price. /// public double OptionPrice { get { return optionPrice; } set { optionPrice = value; } } /// /// Present value of dividends expected on the option’s underlier. /// public double PVDividend { get { return pvDividend; } set { pvDividend = value; } } /// /// Gamma /// public double Gamma { get { return gamma; } set { gamma = value; } } /// /// Vega /// public double Vega { get { return vega; } set { vega = value; } } /// /// Theta /// public double Theta { get { return theta; } set { theta = value; } } /// /// Underlying Price /// public double UnderlyingPrice { get { return underlyingPrice; } set { underlyingPrice = value; } } } }