本文整理汇总了C#中QuickFix.Fields.TransactTime类的典型用法代码示例。如果您正苦于以下问题:C# TransactTime类的具体用法?C# TransactTime怎么用?C# TransactTime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TransactTime类属于QuickFix.Fields命名空间,在下文中一共展示了TransactTime类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Set
public void Set(QuickFix.Fields.TransactTime val)
{
this.TransactTime = val;
}
示例2: CreateNewOrderSingleMessage
public Message CreateNewOrderSingleMessage(string symbol,
MarketSide marketSide,
string clOrdID,
TradingAccount account,
decimal price,
decimal quantity,
OrderType orderType,
string execID)
{
var fOrdType = TranslateFixFields.Translate(orderType);
var fSide = TranslateFixFields.Translate(marketSide);
var fSymbol = new Symbol(symbol);
var fTransactTime = new TransactTime(DateTime.Now);
var fClOrdID = new ClOrdID(clOrdID);
var nos = new NewOrderSingle(fClOrdID,
fSymbol,
fSide,
fTransactTime,
fOrdType)
{
OrderQty = new OrderQty(quantity),
TimeInForce = new TimeInForce(TimeInForce.GOOD_TILL_CANCEL)
};
if (orderType == OrderType.Limit)
nos.Price = new Price(price);
return nos;
}
示例3: DateTimeFieldTest
public void DateTimeFieldTest()
{
fieldmap.SetField(new DateTimeField(Tags.TransactTime, new DateTime(2009, 12, 10)));
TransactTime tt = new TransactTime();
fieldmap.GetField(tt);
Assert.That(new DateTime(2009, 12, 10), Is.EqualTo(tt.Obj));
fieldmap.SetField(new TransactTime(new DateTime(2010, 12, 10)));
fieldmap.GetField(tt);
Assert.That(new DateTime(2010, 12, 10), Is.EqualTo(tt.getValue()));
}
示例4: CreateOrders
private Queue<QuickFix.FIX42.NewOrderSingle> CreateOrders(int n)
{
Queue<QuickFix.FIX42.NewOrderSingle> orders = new Queue<QuickFix.FIX42.NewOrderSingle>(n);
for (int i = 0; i < n; i++) {
ClOrdID cloudOrderId = new ClOrdID(Guid.NewGuid().ToString());
HandlInst handlInst = new HandlInst(HandlInst.AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION);
Symbol symbol = new Symbol("MSFT");
Side side = new Side(Side.BUY);
TransactTime time = new TransactTime();
OrdType orderType = new OrdType(OrdType.LIMIT);
QuickFix.FIX42.NewOrderSingle order = new QuickFix.FIX42.NewOrderSingle(cloudOrderId, handlInst, symbol, side, time, orderType);
order.Account = new Account("Account");
order.OrderQty = new OrderQty(100);
order.ExDestination = new ExDestination("*");
order.TimeInForce = new TimeInForce(TimeInForce.DAY);
order.Price = new Price(50m);
order.SecurityType = new SecurityType(SecurityType.COMMON_STOCK);
orders.Enqueue(order);
}
return orders;
}