當前位置: 首頁>>代碼示例>>C#>>正文


C# Fields.TransactTime類代碼示例

本文整理匯總了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;
 }
開發者ID:RemiGaudin,項目名稱:quickfixn,代碼行數:4,代碼來源:TradeCaptureReport.cs

示例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;
        }
開發者ID:naziway,項目名稱:testtask,代碼行數:30,代碼來源:Fix44MessageGenerator.cs

示例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()));
 }
開發者ID:kennystone,項目名稱:quickfixn,代碼行數:10,代碼來源:FieldMapTests.cs

示例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;
 }
開發者ID:huruixd,項目名稱:quickfixn,代碼行數:21,代碼來源:Client.cs


注:本文中的QuickFix.Fields.TransactTime類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。