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


C# Fields.ClOrdID類代碼示例

本文整理匯總了C#中QuickFix.Fields.ClOrdID的典型用法代碼示例。如果您正苦於以下問題:C# ClOrdID類的具體用法?C# ClOrdID怎麽用?C# ClOrdID使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ClOrdID類屬於QuickFix.Fields命名空間,在下文中一共展示了ClOrdID類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CheckIsInGroupTest

        public void CheckIsInGroupTest()
        {
            QuickFix.DataDictionary.DataDictionary dd = new QuickFix.DataDictionary.DataDictionary("../../../spec/fix/FIX44.xml");
            QuickFix.DataDictionary.DDGrp g = dd.Messages["B"].GetGroup(33);

            QuickFix.Fields.Text textField = new QuickFix.Fields.Text("woot");
            QuickFix.Fields.ClOrdID clOrdIdField = new QuickFix.Fields.ClOrdID("not woot");

            Assert.DoesNotThrow(delegate() { dd.CheckIsInGroup(textField, g, "B"); });
            Assert.Throws(typeof(TagNotDefinedForMessage), delegate { dd.CheckIsInGroup(clOrdIdField, g, "B"); });
        }
開發者ID:nisbus,項目名稱:quickfixn,代碼行數:11,代碼來源:DataDictionaryTests.cs

示例2: TranslateOrderImpl

        private static OrderData TranslateOrderImpl(Symbol symbol,
                                                    Side side,
                                                    OrdType ordType,
                                                    OrderQty orderQty,
                                                    Price price,
                                                    ClOrdID clOrdID,
                                                    Account account)
        {
            switch (ordType.getValue())
            {
                case OrdType.LIMIT:
                    if (price.Obj == 0)
                        throw new IncorrectTagValue(price.Tag);

                    break;

                    //case OrdType.MARKET: break;

                default:
                    throw new IncorrectTagValue(ordType.Tag);
            }

            return new OrderData
                {
                    MarketSide = TranslateFixFields.Translate(side),
                    Symbol = symbol.getValue(),
                    OrderType = TranslateFixFields.Translate(ordType),
                    Quantity = orderQty.getValue(),
                    Price = price.getValue(),
                    ClOrdID = clOrdID.getValue(),
                    Account =
                        account == null
                            ? TradingAccount.None
                            : new TradingAccount(account.getValue())
                };
        }
開發者ID:naziway,項目名稱:testtask,代碼行數:36,代碼來源:TranslateFixMessages.cs

示例3: Set

 public void Set(QuickFix.Fields.ClOrdID val) 
 { 
     this.ClOrdID = val;
 }
開發者ID:RemiGaudin,項目名稱:quickfixn,代碼行數:4,代碼來源:TradeCaptureReport.cs

示例4: 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

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