private void QueryMarketDataRequest()
        {
            QuickFix.FIX44.MarketDataRequest result = new QuickFix.FIX44.MarketDataRequest();
            result.SetField(new MDReqID(DateTime.Now.Millisecond.ToString()));

            var noContraBrokersGroup = new QuickFix.FIX44.ExecutionReport.NoContraBrokersGroup();

            noContraBrokersGroup.Set(QueryPool());
            result.AddGroup(noContraBrokersGroup);

            QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup symGroup = new QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup();
            symGroup.SetField(QuerySymbol());
            symGroup.SetField(new MDUpdateType(MDUpdateType.INCREMENTAL_REFRESH));
            symGroup.SetField(new MarketDepth(0));
            symGroup.SetField(new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES));

            QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup typesGroup = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            typesGroup.SetField(new MDEntryType(MDEntryType.BID));
            result.AddGroup(typesGroup);

            typesGroup = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            typesGroup.SetField(new MDEntryType(MDEntryType.OFFER));
            result.AddGroup(symGroup);

            Console.WriteLine(result);

            SendMessage(result, ".MD");
        }
        private QuickFix.FIX44.NewOrderSingle QueryNewOrderSingle44()
        {
            QuickFix.FIX44.NewOrderSingle newOrderSingle = new QuickFix.FIX44.NewOrderSingle();
            newOrderSingle.ClOrdID = new ClOrdID(DateTime.Now.Millisecond.ToString());
            var noContraBrokersGroup = new QuickFix.FIX44.ExecutionReport.NoContraBrokersGroup();

            noContraBrokersGroup.Set(QueryPool());
            newOrderSingle.AddGroup(noContraBrokersGroup);
            newOrderSingle.Symbol  = QuerySymbol();
            newOrderSingle.Side    = QuerySide();
            newOrderSingle.OrdType = new OrdType(OrdType.MARKET);
            newOrderSingle.Set(QueryOrderQty());
            newOrderSingle.Set(new TimeInForce(TimeInForce.FILL_OR_KILL));
            return(newOrderSingle);
        }