当前位置: 首页>>代码示例>>C#>>正文


C# Fields.TransactTime类代码示例

本文整理汇总了C#中QuickFix.Fields.TransactTime的典型用法代码示例。如果您正苦于以下问题:C# QuickFix.Fields.TransactTime类的具体用法?C# QuickFix.Fields.TransactTime怎么用?C# QuickFix.Fields.TransactTime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


QuickFix.Fields.TransactTime类属于命名空间,在下文中一共展示了QuickFix.Fields.TransactTime类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NewOrderSingle

        /// <summary>
        /// Create a NewOrderSingle message.
        /// </summary>
        /// <param name="customFields"></param>
        /// <param name="orderType"></param>
        /// <param name="side"></param>
        /// <param name="symbol"></param>
        /// <param name="orderQty"></param>
        /// <param name="tif"></param>
        /// <param name="price">ignored if orderType=Market</param>
        /// <returns></returns>
        static public QuickFix.FIX42.NewOrderSingle NewOrderSingle(
            Dictionary<int,string> customFields,
            OrderType orderType, Side side, string symbol,
            int orderQty, TimeInForce tif, decimal price)
        {
            // hard-coded fields
            QuickFix.Fields.HandlInst fHandlInst = new QuickFix.Fields.HandlInst(QuickFix.Fields.HandlInst.AUTOMATED_EXECUTION_ORDER_PRIVATE);
            
            // from params
            QuickFix.Fields.OrdType fOrdType = FixEnumTranslator.ToField(orderType);
            QuickFix.Fields.Side fSide = FixEnumTranslator.ToField(side);
            QuickFix.Fields.Symbol fSymbol = new QuickFix.Fields.Symbol(symbol);
            QuickFix.Fields.TransactTime fTransactTime = new QuickFix.Fields.TransactTime(DateTime.Now);
            QuickFix.Fields.ClOrdID fClOrdID = GenerateClOrdID();

            QuickFix.FIX42.NewOrderSingle nos = new QuickFix.FIX42.NewOrderSingle(
                fClOrdID, fHandlInst, fSymbol, fSide, fTransactTime, fOrdType);
            nos.OrderQty = new QuickFix.Fields.OrderQty(orderQty);
            nos.TimeInForce = FixEnumTranslator.ToField(tif);

            if (orderType == OrderType.Limit)
                nos.Price = new QuickFix.Fields.Price(price);

            // add custom fields
            foreach (KeyValuePair<int,string> p in customFields)
                nos.SetField(new QuickFix.Fields.StringField(p.Key, p.Value));

            return nos;
        }
开发者ID:cbusbey,项目名称:qfn_uidemo,代码行数:40,代码来源:MessageCreator42.cs

示例2: Set

 public void Set(QuickFix.Fields.TransactTime val)
 {
     this.TransactTime = val;
 }
开发者ID:ChuangYang,项目名称:quickfixn,代码行数:4,代码来源:SettlementInstructions.cs


注:本文中的QuickFix.Fields.TransactTime类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。