using System;
namespace Krs.Ats.IBNet
{
///
/// The openOrder() callback with the new OrderState() object will now be invoked
/// each time TWS receives commission information for a trade.
///
[Serializable()]
public class OrderState
{
#region Private Variables
private OrderStatus status;
private String initMargin;
private String maintMargin;
private String equityWithLoan;
private double commission;
private double minCommission;
private double maxCommission;
private String commissionCurrency;
private String warningText;
#endregion
#region Constructors
///
/// Default Constructor
///
public OrderState():this(OrderStatus.None, null, null, null, 0.0, 0.0, 0.0, null, null)
{
}
///
/// Fully Specified Constructor
///
/// Order Status
/// Initial margin requirement for the order.
/// Maintenance margin requirement for the order.
///
///
///
///
///
///
public OrderState(OrderStatus status, String initMargin, String maintMargin, String equityWithLoan, double commission, double minCommission, double maxCommission, String commissionCurrency, String warningText)
{
this.status = status;
this.initMargin = initMargin;
this.maintMargin = maintMargin;
this.equityWithLoan = equityWithLoan;
this.commission = commission;
this.minCommission = minCommission;
this.maxCommission = maxCommission;
this.commissionCurrency = commissionCurrency;
this.warningText = warningText;
}
#endregion
#region Properties
///
/// Order Status
///
public OrderStatus Status
{
get { return status; }
set { status = value; }
}
///
/// Initial margin requirement for the order.
///
public string InitMargin
{
get { return initMargin; }
set { initMargin = value; }
}
///
/// Maintenance margin requirement for the order.
///
public string MaintMargin
{
get { return maintMargin; }
set { maintMargin = value; }
}
///
///
///
public double Commission
{
get { return commission; }
set { commission = value; }
}
///
///
///
public double MinCommission
{
get { return minCommission; }
set { minCommission = value; }
}
///
///
///
public double MaxCommission
{
get { return maxCommission; }
set { maxCommission = value; }
}
///
///
///
public string CommissionCurrency
{
get { return commissionCurrency; }
set { commissionCurrency = value; }
}
///
///
///
public string WarningText
{
get { return warningText; }
set { warningText = value; }
}
///
///
///
public string EquityWithLoan
{
get { return equityWithLoan; }
set { equityWithLoan = value; }
}
#endregion
}
}