Esempio n. 1
0
 public AccountSummary()
 {
     this.Id          = new AccountID();
     this.Currency    = new Currency();
     this.Balance     = new AccountUnits();
     this.CreatedTime = new DateTime();
     this.GuaranteedStopLossOrderMode = new GuaranteedStopLossOrderMode();
     this.PL                          = new AccountUnits();
     this.ResettablePL                = new AccountUnits();
     this.ResettablePLTime            = new DateTime();
     this.Financing                   = new AccountUnits();
     this.Commission                  = new AccountUnits();
     this.GuaranteedExecutionFees     = new AccountUnits();
     this.MarginCallEnterTime         = new DateTime();
     this.LastMarginCallExtensionTime = new DateTime();
     this.UnrealizedPL                = new AccountUnits();
     this.NAV                         = new AccountUnits();
     this.MarginUsed                  = new AccountUnits();
     this.MarginAvailable             = new AccountUnits();
     this.PositionValue               = new AccountUnits();
     this.MarginCloseoutUnrealizedPL  = new AccountUnits();
     this.MarginCloseoutNAV           = new AccountUnits();
     this.MarginCloseoutMarginUsed    = new AccountUnits();
     this.WithdrawalLimit             = new AccountUnits();
     this.MarginCallMarginUsed        = new AccountUnits();
     this.LastTransactionID           = new TransactionID();
 }
 public TransferFundsRejectTransaction(
     TransactionID id,
     DateTime time,
     int userID,
     AccountID accountID,
     TransactionID batchID,
     RequestID requestID,
     TransactionType type,
     AccountUnits amount,
     FundingReason fundingReason,
     string comment,
     TransactionRejectReason rejectReason
     )
 {
     this.Id            = id;
     this.Time          = time;
     this.UserID        = userID;
     this.AccountID     = accountID;
     this.BatchID       = batchID;
     this.RequestID     = requestID;
     this.Type          = type;
     this.Amount        = amount;
     this.FundingReason = fundingReason;
     this.Comment       = comment;
     this.RejectReason  = rejectReason;
 }
Esempio n. 3
0
 public OrderFillTransaction(TransactionID transactionID, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, OrderID orderID, ClientID clientOrderID, InstrumentName instrument, double units, double gainQuoteHomeConversionFactor, double lossQuoteHomeConversionFactor, ClientPrice fullPrice, OrderFillReason reason, AccountUnits pL, AccountUnits financing, AccountUnits commission, AccountUnits guaranteedExecutionFee, AccountUnits accountBalance, TradeOpen tradeOpened, List <TradeReduce> tradesClosed, TradeReduce tradeReduced, AccountUnits halfSpreadCost)
 {
     this.TransactionID = transactionID;
     this.Time          = time;
     this.UserID        = userID;
     this.AccountID     = accountID;
     this.BatchID       = batchID;
     this.RequestID     = requestID;
     this.Type          = type;
     this.OrderID       = orderID;
     this.ClientOrderID = clientOrderID;
     this.Instrument    = instrument;
     this.Units         = units;
     this.GainQuoteHomeConversionFactor = gainQuoteHomeConversionFactor;
     this.LossQuoteHomeConversionFactor = lossQuoteHomeConversionFactor;
     this.FullPrice              = fullPrice;
     this.Reason                 = reason;
     this.PL                     = pL;
     this.Financing              = financing;
     this.Commission             = commission;
     this.GuaranteedExecutionFee = guaranteedExecutionFee;
     this.AccountBalance         = accountBalance;
     this.TradeOpened            = tradeOpened;
     this.TradesClosed           = tradesClosed;
     this.TradeReduced           = tradeReduced;
     this.HalfSpreadCost         = halfSpreadCost;
 }
 public CalculatedPositionState(InstrumentName instrument, AccountUnits netUnrealizedPL, AccountUnits longUnrealizedPL, AccountUnits shortUnrealizedPL, AccountUnits marginUsed)
 {
     this.Instrument        = instrument;
     this.NetUnrealizedPL   = netUnrealizedPL;
     this.LongUnrealizedPL  = longUnrealizedPL;
     this.ShortUnrealizedPL = shortUnrealizedPL;
     this.MarginUsed        = marginUsed;
 }
 public CalculatedPositionState()
 {
     this.Instrument        = new InstrumentName();
     this.NetUnrealizedPL   = new AccountUnits();
     this.LongUnrealizedPL  = new AccountUnits();
     this.ShortUnrealizedPL = new AccountUnits();
     this.MarginUsed        = new AccountUnits();
 }
Esempio n. 6
0
 public TradeOpen()
 {
     this.TradeID = new TradeID();
     this.Price   = new PriceValue();
     this.GuaranteedExecutionFee = new AccountUnits();
     this.ClientExtensions       = new ClientExtensions();
     this.HalfSpreadCost         = new AccountUnits();
     this.InitialMarginRequired  = new AccountUnits();
 }
Esempio n. 7
0
 public TradeReduce()
 {
     this.TradeID                = new TradeID();
     this.Price                  = new PriceValue();
     this.RealizedPL             = new AccountUnits();
     this.Financing              = new AccountUnits();
     this.GuaranteedExecutionFee = new AccountUnits();
     this.HalfSpreadCost         = new AccountUnits();
 }
Esempio n. 8
0
 public PositionSide(double units, PriceValue averagePrice, List <TradeID> tradeIDs, AccountUnits pL, AccountUnits unrealizedPL, AccountUnits resettablePL, AccountUnits financing, AccountUnits guaranteedExecutionFees)
 {
     this.AveragePrice            = averagePrice;
     this.TradeIDs                = tradeIDs;
     this.PL                      = pL;
     this.UnrealizedPL            = unrealizedPL;
     this.ResettablePL            = resettablePL;
     this.Financing               = financing;
     this.GuaranteedExecutionFees = guaranteedExecutionFees;
 }
 public PositionFinancing(
     InstrumentName instrument,
     AccountUnits financing,
     List <OpenTradeFinancing> openTradeFinancings
     )
 {
     this.Instrument          = instrument;
     this.Financing           = financing;
     this.OpenTradeFinancings = openTradeFinancings;
 }
Esempio n. 10
0
 public PositionSide()
 {
     this.AveragePrice            = new PriceValue();
     this.TradeIDs                = new List <TradeID>();
     this.PL                      = new AccountUnits();
     this.UnrealizedPL            = new AccountUnits();
     this.ResettablePL            = new AccountUnits();
     this.Financing               = new AccountUnits();
     this.GuaranteedExecutionFees = new AccountUnits();
 }
 public TransferFundsRejectTransaction()
 {
     this.Id            = new TransactionID();
     this.Time          = new DateTime();
     this.AccountID     = new AccountID();
     this.BatchID       = new TransactionID();
     this.RequestID     = new RequestID();
     this.Type          = new TransactionType(ETransactionType.TRANSFER_FUNDS_REJECT);
     this.Amount        = new AccountUnits();
     this.FundingReason = new FundingReason();
     this.RejectReason  = new TransactionRejectReason();
 }
Esempio n. 12
0
 public Position(InstrumentName instrument, AccountUnits pL, AccountUnits unrealizedPL, AccountUnits marginUsed, AccountUnits resettablePL, AccountUnits financing, AccountUnits commission, AccountUnits guaranteedExecutionFees, PositionSide @long, PositionSide @short)
 {
     this.Instrument              = instrument;
     this.PL                      = pL;
     this.UnrealizedPL            = unrealizedPL;
     this.MarginUsed              = marginUsed;
     this.ResettablePL            = resettablePL;
     this.Financing               = financing;
     this.Commission              = commission;
     this.GuaranteedExecutionFees = guaranteedExecutionFees;
     this.Long                    = @long;
     this.Short                   = @short;
 }
 public CalculatedAccountState()
 {
     this.UnrealizedPL               = new AccountUnits();
     this.NAV                        = new AccountUnits();
     this.MarginUsed                 = new AccountUnits();
     this.MarginAvailable            = new AccountUnits();
     this.PositionValue              = new AccountUnits();
     this.MarginCloseoutUnrealizedPL = new AccountUnits();
     this.MarginCloseoutNAV          = new AccountUnits();
     this.MarginCloseoutMarginUsed   = new AccountUnits();
     this.WithdrawalLimit            = new AccountUnits();
     this.MarginCallMarginUsed       = new AccountUnits();
 }
 public DailyFinancingTransaction()
 {
     this.Id                   = new TransactionID();
     this.Time                 = new DateTime();
     this.AccountID            = new AccountID();
     this.BatchID              = new TransactionID();
     this.RequestID            = new RequestID();
     this.Type                 = new TransactionType(ETransactionType.DAILY_FINANCING);
     this.Financing            = new AccountUnits();
     this.AccountBalance       = new AccountUnits();
     this.AccountFinancingMode = new AccountFinancingMode();
     this.PositionFinancings   = new List <PositionFinancing>();
 }
Esempio n. 15
0
 public Position()
 {
     this.Instrument              = new InstrumentName();
     this.PL                      = new AccountUnits();
     this.UnrealizedPL            = new AccountUnits();
     this.MarginUsed              = new AccountUnits();
     this.ResettablePL            = new AccountUnits();
     this.Financing               = new AccountUnits();
     this.Commission              = new AccountUnits();
     this.GuaranteedExecutionFees = new AccountUnits();
     this.Long                    = new PositionSide();
     this.Short                   = new PositionSide();
 }
 public DailyFinancingTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, AccountUnits financing, AccountUnits accountBalance, AccountFinancingMode accountFinancingMode, List <PositionFinancing> positionFinancings)
 {
     this.Id                   = id;
     this.Time                 = time;
     this.UserID               = userID;
     this.AccountID            = accountID;
     this.BatchID              = batchID;
     this.RequestID            = requestID;
     this.Type                 = type;
     this.Financing            = financing;
     this.AccountBalance       = accountBalance;
     this.AccountFinancingMode = accountFinancingMode;
     this.PositionFinancings   = positionFinancings;
 }
 public AccountChangesState()
 {
     this.UnrealizedPL               = new AccountUnits();
     this.NAV                        = new AccountUnits();
     this.MarginUsed                 = new AccountUnits();
     this.MarginAvailable            = new AccountUnits();
     this.Positionvalue              = new AccountUnits();
     this.MarginCloseoutUnrealizedPL = new AccountUnits();
     this.MarginCloseoutNAV          = new AccountUnits();
     this.MarginCloseoutMarginUsed   = new AccountUnits();
     this.WithdrawalLimit            = new AccountUnits();
     this.MarginCallMarginUsed       = new AccountUnits();
     this.Orders                     = new List <DynamicOrderState>();
     this.Trades                     = new List <CalculatedTradeState>();
     this.Positions                  = new List <CalculatedPositionState>();
 }
 public CalculatedAccountState(AccountUnits unrealizedPL, AccountUnits nAV, AccountUnits marginUsed, AccountUnits marginAvailable, AccountUnits positionValue, AccountUnits marginCloseoutUnrealizedPL, AccountUnits marginCloseoutNAV, AccountUnits marginCloseoutMarginUsed, double marginCloseoutPercent, double marginCloseoutPositionValue, AccountUnits withdrawalLimit, AccountUnits marginCallMarginUsed, double marginCallPercent)
 {
     this.UnrealizedPL                = unrealizedPL;
     this.NAV                         = nAV;
     this.MarginUsed                  = marginUsed;
     this.MarginAvailable             = marginAvailable;
     this.PositionValue               = positionValue;
     this.MarginCloseoutUnrealizedPL  = marginCloseoutUnrealizedPL;
     this.MarginCloseoutNAV           = marginCloseoutNAV;
     this.MarginCloseoutMarginUsed    = marginCloseoutMarginUsed;
     this.MarginCloseoutPercent       = marginCloseoutPercent;
     this.MarginCloseoutPositionValue = marginCloseoutPositionValue;
     this.WithdrawalLimit             = withdrawalLimit;
     this.MarginCallMarginUsed        = marginCallMarginUsed;
     this.MarginCallPercent           = marginCallPercent;
 }
Esempio n. 19
0
 public TradeOpen(
     TradeID tradeID,
     double units,
     PriceValue price,
     AccountUnits guaranteedExecutionFee,
     ClientExtensions clientExtensions,
     AccountUnits halfSpreadCost,
     AccountUnits initialMarginRequired)
 {
     this.TradeID = tradeID;
     this.Units   = units;
     this.Price   = price;
     this.GuaranteedExecutionFee = guaranteedExecutionFee;
     this.ClientExtensions       = clientExtensions;
     this.HalfSpreadCost         = halfSpreadCost;
     this.InitialMarginRequired  = initialMarginRequired;
 }
Esempio n. 20
0
 public TradeReduce(
     TradeID tradeID,
     double units,
     PriceValue price,
     AccountUnits realizedPL,
     AccountUnits financing,
     AccountUnits guaranteedExecutionFee,
     AccountUnits halfSpreadCost
     )
 {
     this.TradeID                = tradeID;
     this.Units                  = units;
     this.Price                  = price;
     this.RealizedPL             = realizedPL;
     this.Financing              = financing;
     this.GuaranteedExecutionFee = guaranteedExecutionFee;
     this.HalfSpreadCost         = halfSpreadCost;
 }
 public AccountChangesState(AccountUnits unrealizedPL, AccountUnits nAV, AccountUnits marginUsed, AccountUnits marginAvailable, AccountUnits positionvalue, AccountUnits marginCloseoutUnrealizedPL, AccountUnits marginCloseoutNAV, AccountUnits marginCloseoutMarginUsed, double marginCloseoutPercent, double marginCloseoutPositionValue, AccountUnits withdrawalLimit, AccountUnits marginCallMarginUsed, double marginCallPercent, List <DynamicOrderState> orders, List <CalculatedTradeState> trades, List <CalculatedPositionState> positions)
 {
     this.UnrealizedPL                = unrealizedPL;
     this.NAV                         = nAV;
     this.MarginUsed                  = marginUsed;
     this.MarginAvailable             = marginAvailable;
     this.Positionvalue               = positionvalue;
     this.MarginCloseoutUnrealizedPL  = marginCloseoutUnrealizedPL;
     this.MarginCloseoutNAV           = marginCloseoutNAV;
     this.MarginCloseoutMarginUsed    = marginCloseoutMarginUsed;
     this.MarginCloseoutPercent       = marginCloseoutPercent;
     this.MarginCloseoutPositionValue = marginCloseoutPositionValue;
     this.WithdrawalLimit             = withdrawalLimit;
     this.MarginCallMarginUsed        = marginCallMarginUsed;
     this.MarginCallPercent           = marginCallPercent;
     this.Orders                      = orders;
     this.Trades                      = trades;
     this.Positions                   = positions;
 }
Esempio n. 22
0
 public TradeSummary()
 {
     this.Id                      = new TradeID();
     this.Instrument              = new InstrumentName();
     this.Price                   = new PriceValue();
     this.OpenTime                = new DateTime();
     this.State                   = new TradeState();
     this.InitialMarginRequired   = new AccountUnits();
     this.RealizedPL              = new AccountUnits();
     this.UnrealizedPL            = new AccountUnits();
     this.MarginUsed              = new AccountUnits();
     this.AverageClosePrice       = new PriceValue();
     this.ClosingTransactionIDs   = new List <TransactionID>();
     this.Financing               = new AccountUnits();
     this.CloseTime               = new DateTime();
     this.ClientExtensions        = new ClientExtensions();
     this.TakeProfitOrderID       = new OrderID();
     this.StopLossOrderID         = new OrderID();
     this.TrailingStopLossOrderID = new OrderID();
 }
Esempio n. 23
0
 public Account(AccountID id, string alias, Currency currency, AccountUnits balance, int createdByUserId, DateTime createdTime, GuaranteedStopLossOrderMode guaranteedStopLossOrderMode, AccountUnits pL, AccountUnits resettablePL, DateTime resettablePLTime, AccountUnits financing, AccountUnits commission, AccountUnits guaranteedExecutionFees, double marginRate, DateTime marginCallEnterTime, int marginCallExtensionCount, DateTime lastMarginCallExtensionTime, int openTradeCount, int openPositionCount, int pendingOrderCount, bool hedgingEnabled, AccountUnits unrealizedPL, AccountUnits nAV, AccountUnits marginUsed, AccountUnits marginAvailable, AccountUnits positionValue, AccountUnits marginCloseoutUnrealizedPL, AccountUnits marginCloseoutNAV, AccountUnits marginCloseoutMarginUsed, double marginCloseoutPercent, double marginCloseoutPositionValue, AccountUnits withdrawalLimit, AccountUnits marginCallMarginUsed, double marginCallPercent, TransactionID lastTransactionId, List <TradeSummary> trades, List <Position> positions, List <Order> orders)
 {
     this.Id                          = id;
     this.Alias                       = alias;
     this.Currency                    = currency;
     this.Balance                     = balance;
     this.CreatedByUserId             = createdByUserId;
     this.CreatedTime                 = createdTime;
     this.GuaranteedStopLossOrderMode = guaranteedStopLossOrderMode;
     this.PL                          = pL;
     this.ResettablePL                = resettablePL;
     this.ResettablePLTime            = resettablePLTime;
     this.Financing                   = financing;
     this.Commission                  = commission;
     this.GuaranteedExecutionFees     = guaranteedExecutionFees;
     this.MarginRate                  = marginRate;
     this.MarginCallEnterTime         = marginCallEnterTime;
     this.MarginCallExtensionCount    = marginCallExtensionCount;
     this.LastMarginCallExtensionTime = lastMarginCallExtensionTime;
     this.OpenTradeCount              = openTradeCount;
     this.OpenPositionCount           = openPositionCount;
     this.PendingOrderCount           = pendingOrderCount;
     this.HedgingEnabled              = hedgingEnabled;
     this.UnrealizedPL                = unrealizedPL;
     this.NAV                         = nAV;
     this.MarginUsed                  = marginUsed;
     this.MarginAvailable             = marginAvailable;
     this.PositionValue               = positionValue;
     this.MarginCloseoutUnrealizedPL  = marginCloseoutUnrealizedPL;
     this.MarginCloseoutNAV           = marginCloseoutNAV;
     this.MarginCloseoutMarginUsed    = marginCloseoutMarginUsed;
     this.MarginCloseoutPercent       = marginCloseoutPercent;
     this.MarginCloseoutPositionValue = marginCloseoutPositionValue;
     this.WithdrawalLimit             = withdrawalLimit;
     this.MarginCallMarginUsed        = marginCallMarginUsed;
     this.MarginCallPercent           = marginCallPercent;
     //this.LastTransactionId = lastTransactionId;
     this.Trades    = trades;
     this.Positions = positions;
     this.Orders    = orders;
 }
Esempio n. 24
0
 public TradeSummary(TradeID id, InstrumentName instrument, PriceValue price, DateTime openTime, TradeState state, double initialUnits, AccountUnits initialMarginRequired, double currentUnits, AccountUnits realizedPL, AccountUnits unrealizedPL, AccountUnits marginUsed, PriceValue averageClosePrice, List <TransactionID> closingTransactionIDs, AccountUnits financing, DateTime closeTime, ClientExtensions clientExtensions, OrderID takeProfitOrderID, OrderID stopLossOrderID, OrderID trailingStopLossOrderID)
 {
     this.Id                      = id;
     this.Instrument              = instrument;
     this.Price                   = price;
     this.OpenTime                = openTime;
     this.State                   = state;
     this.InitialUnits            = initialUnits;
     this.InitialMarginRequired   = initialMarginRequired;
     this.CurrentUnits            = currentUnits;
     this.RealizedPL              = realizedPL;
     this.UnrealizedPL            = unrealizedPL;
     this.MarginUsed              = marginUsed;
     this.AverageClosePrice       = averageClosePrice;
     this.ClosingTransactionIDs   = closingTransactionIDs;
     this.Financing               = financing;
     this.CloseTime               = closeTime;
     this.ClientExtensions        = clientExtensions;
     this.TakeProfitOrderID       = takeProfitOrderID;
     this.StopLossOrderID         = stopLossOrderID;
     this.TrailingStopLossOrderID = trailingStopLossOrderID;
 }
Esempio n. 25
0
 public OrderFillTransaction()
 {
     this.TransactionID          = new TransactionID();
     this.Time                   = new DateTime();
     this.AccountID              = new AccountID();
     this.BatchID                = new TransactionID();
     this.RequestID              = new RequestID();
     this.Type                   = new TransactionType(ETransactionType.ORDER_FILL);
     this.OrderID                = new OrderID();
     this.ClientOrderID          = new ClientID();
     this.Instrument             = new InstrumentName();
     this.FullPrice              = new ClientPrice();
     this.Reason                 = new OrderFillReason();
     this.PL                     = new AccountUnits();
     this.Financing              = new AccountUnits();
     this.Commission             = new AccountUnits();
     this.GuaranteedExecutionFee = new AccountUnits();
     this.AccountBalance         = new AccountUnits();
     this.TradeOpened            = new TradeOpen();
     this.TradesClosed           = new List <TradeReduce>();
     this.TradeReduced           = new TradeReduce();
     this.HalfSpreadCost         = new AccountUnits();
 }
Esempio n. 26
0
 public OpenTradeFinancing()
 {
     this.TradeID   = new TradeID();
     this.Financing = new AccountUnits();
 }
Esempio n. 27
0
 public PositionFinancing()
 {
     this.Instrument          = new InstrumentName();
     this.Financing           = new AccountUnits();
     this.OpenTradeFinancings = new List <OpenTradeFinancing>();
 }
Esempio n. 28
0
 public OpenTradeFinancing(TradeID tradeID, AccountUnits financing)
 {
     this.TradeID   = tradeID;
     this.Financing = financing;
 }
 public CalculatedTradeState()
 {
     this.Id           = new TradeID();
     this.UnrealizedPL = new AccountUnits();
     this.MarginUsed   = new AccountUnits();
 }
 public CalculatedTradeState(TradeID id, AccountUnits unrealizedPL, AccountUnits marginUsed)
 {
     this.Id           = id;
     this.UnrealizedPL = unrealizedPL;
     this.MarginUsed   = marginUsed;
 }