Пример #1
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Instrument, Instrument);
            fmt.AddField(LogFieldNames.BestBidPrice, BestBidPrice);
            fmt.AddField(LogFieldNames.BestBidQuantity, BestBidQuantity);
            fmt.AddField(LogFieldNames.BestOfferPrice, BestOfferPrice);
            fmt.AddField(LogFieldNames.BestOfferQuantity, BestOfferQuantity);
            fmt.AddField(LogFieldNames.TopPriceLimit, TopPriceLimit);
            fmt.AddField(LogFieldNames.BottomPriceLimit, BottomPriceLimit);
            fmt.AddField(LogFieldNames.DecimalPlaces, DecimalPlaces);
            fmt.AddField(LogFieldNames.LastPrice, LastPrice);
            fmt.AddField(LogFieldNames.LotSize, LotSize);
            fmt.AddField(LogFieldNames.PriceStep, PriceStep);
            fmt.AddField(LogFieldNames.PriceStepValue, PriceStepValue);
            fmt.AddField(LogFieldNames.Settlement, Settlement);
            fmt.AddField(LogFieldNames.PreviousSettlement, PreviousSettlement);
            fmt.AddField(LogFieldNames.TheorPrice, TheorPrice);
            fmt.AddField(LogFieldNames.Vola, Vola);
            fmt.AddField(LogFieldNames.VolaTranslatedByFeed, VolaTranslatedByFeed);
            fmt.AddField(LogFieldNames.OpenInterest, OpenInterest);
            fmt.AddField(LogFieldNames.SessionEndTime, SessionEndTime);
            return(fmt.ToString());
        }
Пример #2
0
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddListField(LogFieldNames.Items, accounts);
            return(fmt.ToString());
        }
Пример #3
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.TransactionId, trans_id);
            fmt.AddEnumField(LogFieldNames.State, State);
            fmt.AddField(LogFieldNames.OrderNumber, order_num);
            fmt.AddField(LogFieldNames.Flags, flags);
            fmt.AddEnumField(LogFieldNames.Operation, Operation);
            fmt.AddField(LogFieldNames.BrokerRef, brokerref);
            fmt.AddField(LogFieldNames.UserId, userid);
            fmt.AddField(LogFieldNames.FirmId, firmid);
            fmt.AddField(LogFieldNames.Account, account);
            fmt.AddField(LogFieldNames.Price, price);
            fmt.AddField(LogFieldNames.Quantity, qty);
            fmt.AddField(LogFieldNames.Balance, balance);
            fmt.AddField(LogFieldNames.ClientCode, client_code);
            fmt.AddField(LogFieldNames.ExchangeCode, exchange_code);
            fmt.AddField(LogFieldNames.ActivationTime, activation_time);
            fmt.AddField(LogFieldNames.SecCode, sec_code);
            fmt.AddField(LogFieldNames.ClassCode, class_code);
            fmt.AddField(LogFieldNames.Time, datetime);
            fmt.AddField(LogFieldNames.WithdrawDatetime, withdraw_datetime);
            fmt.AddField(LogFieldNames.ValueEntryType, value_entry_type);
            fmt.AddField(LogFieldNames.RejectReason, reject_reason);
            return(fmt.ToString());
        }
Пример #4
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Account, AcctCode);
            return(fmt.ToString());
        }
Пример #5
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Order, Order?.OrderExchangeId);
            return(fmt.ToString());
        }
Пример #6
0
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Code, code);
            fmt.AddField(LogFieldNames.ClassCode, classCode);
            fmt.AddField(LogFieldNames.FullCode, fullCode);
            fmt.AddField(LogFieldNames.BestBidPrice, bid);
            fmt.AddField(LogFieldNames.BestBidQuantity, bidQuantity);
            fmt.AddField(LogFieldNames.BestOfferPrice, offer);
            fmt.AddField(LogFieldNames.BestOfferQuantity, offerQuantity);
            fmt.AddField(LogFieldNames.LastPrice, last);
            fmt.AddField(LogFieldNames.PriceStepValue, priceStep);
            fmt.AddField(LogFieldNames.Time, time);
            fmt.AddField(LogFieldNames.Strike, strike);
            fmt.AddField(LogFieldNames.Vola, volatility);
            fmt.AddField(LogFieldNames.LotSize, lotsize);
            fmt.AddField(LogFieldNames.Type, optiontype);
            fmt.AddField(LogFieldNames.OptionBase, optionbase);
            fmt.AddField(LogFieldNames.TopPriceLimit, pricemax);
            fmt.AddField(LogFieldNames.BottomPriceLimit, pricemin);
            fmt.AddField(LogFieldNames.Settlement, settlement);
            fmt.AddField(LogFieldNames.OpenInterest, openinterest);
            fmt.AddField(LogFieldNames.PreviousSettlement, previousSettlement);
            fmt.AddField(LogFieldNames.StepPriceT, stepPriceT);
            fmt.AddField(LogFieldNames.StepPrice, stepPrice);
            fmt.AddField(LogFieldNames.StepPriceCl, stepPriceCl);
            fmt.AddField(LogFieldNames.StepPricePrCl, stepPricePrCl);
            fmt.AddField(LogFieldNames.StepPricePrCl, stepPricePrCl);
            fmt.AddField(LogFieldNames.EndTime, endTime);
            return(fmt.ToString());
        }
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Instrument, instrument);
            return(fmt.ToString());
        }
Пример #8
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Account, Account);
            fmt.AddField(LogFieldNames.ClientCode, ClientCode);

            lock (syncRoot)
            {
                foreach (var property in properties)
                {
                    switch (property.Type)
                    {
                    case MoneyPositionPropertyType.Decimal:
                        fmt.AddFieldRequired(property.Name.ToLowerInvariant(), property.AsDecimal());
                        break;

                    case MoneyPositionPropertyType.String:
                        fmt.AddField(property.Name.ToLowerInvariant(), property.AsString());
                        break;
                    }
                }
            }

            return(fmt.ToString());
        }
Пример #9
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Message, Message);
            fmt.AddField(LogFieldNames.StackTrace, StackTrace);
            return(fmt.ToString());
        }
Пример #10
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            PrintCommonProperties(fmt);
            fmt.AddFieldRequired(LogFieldNames.ExchangeOrderId, OrderExchangeId);
            return(fmt.ToString());
        }
Пример #11
0
        public string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Price, p);
            fmt.AddField(LogFieldNames.Quantity, q);
            return(fmt.ToString());
        }
Пример #12
0
 /// <summary>
 ///     Вывод на печать свойств из класса <see cref="Transaction"/>
 /// </summary>
 /// <param name="fmt"></param>
 protected void PrintCommonProperties(ObjectLogFormatter fmt)
 {
     fmt.AddField(LogFieldNames.TransactionId, TransactionId);
     fmt.AddField(LogFieldNames.Instrument, Instrument?.Code);
     fmt.AddField(LogFieldNames.Account, Account);
     fmt.AddField(LogFieldNames.ClientCode, ClientCode);
     fmt.AddField(LogFieldNames.IsManual, IsManual);
 }
Пример #13
0
        public string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Id, id);
            fmt.AddListField(LogFieldNames.Items, body);
            return(fmt.ToString());
        }
Пример #14
0
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddListField(LogFieldNames.Futures, FuturesCodes);
            fmt.AddListField(LogFieldNames.Options, OptionsCodes);
            return(fmt.ToString());
        }
Пример #15
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.TransactionId, TransactionId);
            fmt.AddField(LogFieldNames.Success, Success);
            fmt.AddField(LogFieldNames.Message, Message);
            return(fmt.ToString());
        }
Пример #16
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Id, conId);
            fmt.AddField(LogFieldNames.Symbol, LocalSymbol);
            fmt.AddField(LogFieldNames.Exchange, Exchange);
            return(fmt.ToString());
        }
Пример #17
0
        /// <summary>
        /// Конвертация в строку CQGContinuum.WebAPI.ContractMetadata
        /// </summary>
        private string ContractMetadataToString(ContractMetadata cmd)
        {
            var fmt = ObjectLogFormatter.Create(PrintOption.Nested, "CONTRACT_METADATA");

            fmt.AddField("sym", cmd.contract_symbol);
            fmt.AddField("und", cmd.underlying_contract_symbol);
            fmt.AddField("title", cmd.title);
            fmt.AddField("desc", cmd.description);
            return(fmt.ToString());
        }
Пример #18
0
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Id, id);
            fmt.AddField(LogFieldNames.Instrument, instrument);
            fmt.AddEnumField(LogFieldNames.Span, span);
            fmt.AddListField(LogFieldNames.Candles, candles);
            return(fmt.ToString());
        }
Пример #19
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Account, Account);
            fmt.AddField(LogFieldNames.ClientCode, ClientCode);
            fmt.AddField(LogFieldNames.Instrument, Instrument);
            fmt.AddField(LogFieldNames.Quantity, Quantity);
            fmt.AddField(LogFieldNames.Price, Price);
            return(fmt.ToString());
        }
Пример #20
0
        public string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField("t", Time);
            fmt.AddField("o", o);
            fmt.AddField("h", h);
            fmt.AddField("l", l);
            fmt.AddField("c", c);
            return(fmt.ToString());
        }
Пример #21
0
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Time, time);
            fmt.AddField(LogFieldNames.StartTime, startTime);
            fmt.AddField(LogFieldNames.EndTime, endTime);
            fmt.AddField(LogFieldNames.EveningStartTime, evnStartTime);
            fmt.AddField(LogFieldNames.EveningEndTime, evnEndTime);
            return(fmt.ToString());
        }
Пример #22
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Account, Account);
            fmt.AddField(LogFieldNames.Type, OrderType);
            fmt.AddField(LogFieldNames.Action, Action);
            fmt.AddField(LogFieldNames.Price, LmtPrice);
            fmt.AddField(LogFieldNames.Quantity, TotalQuantity);
            return(fmt.ToString());
        }
Пример #23
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Id, Id);
            fmt.AddField(LogFieldNames.Instrument, Instrument);
            fmt.AddField(LogFieldNames.Time, DateTime);
            fmt.AddEnumField(LogFieldNames.Operation, Operation);
            fmt.AddField(LogFieldNames.Price, Price);
            fmt.AddField(LogFieldNames.Quantity, Quantity);
            return(fmt.ToString());
        }
Пример #24
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.TransactionId, trans_id);
            fmt.AddField(LogFieldNames.Status, status);
            fmt.AddField(LogFieldNames.Result, result_msg);
            fmt.AddField(LogFieldNames.Time, time);
            fmt.AddField(LogFieldNames.Uid, uid);
            fmt.AddField(LogFieldNames.ServerTransactionId, server_trans_id);
            return(fmt.ToString());
        }
Пример #25
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Time, ServerTime);
            fmt.AddField(LogFieldNames.IsTrading, IsTrading);
            fmt.AddField(LogFieldNames.StartTime, StartTime);
            fmt.AddField(LogFieldNames.EndTime, EndTime);
            fmt.AddField(LogFieldNames.EveningStartTime, EveningStartTime);
            fmt.AddField(LogFieldNames.EveningEndTime, EveningEndTime);
            return(fmt.ToString());
        }
Пример #26
0
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.FirmId, firmid);
            fmt.AddField(LogFieldNames.AccountId, trdaccid);
            fmt.AddField(LogFieldNames.SecCode, sec_code);
            fmt.AddField(LogFieldNames.StartNet, startnet);
            fmt.AddField(LogFieldNames.TotalNet, totalnet);
            fmt.AddField(LogFieldNames.VarMargin, varmargin);
            return(fmt.ToString());
        }
Пример #27
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.Time, Point);
            fmt.AddField(LogFieldNames.Low, Low);
            fmt.AddField(LogFieldNames.High, High);
            fmt.AddField(LogFieldNames.Open, Open);
            fmt.AddField(LogFieldNames.Close, Close);
            fmt.AddField(LogFieldNames.PeriodVolume, PeriodVolume);
            fmt.AddField(LogFieldNames.OpenInterest, OpenInterest);
            return(fmt.ToString());
        }
Пример #28
0
        }                                          //

        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.FirmId, firmid);
            fmt.AddField(LogFieldNames.AccountId, trdaccid);
            fmt.AddField(LogFieldNames.CbpLimit, cbplimit);
            fmt.AddField(LogFieldNames.CbpLUsed, cbplused);
            fmt.AddField(LogFieldNames.CbpLPlanned, cbplplanned);
            fmt.AddField(LogFieldNames.VarMargin, varmargin);
            fmt.AddField(LogFieldNames.TsComission, ts_comission);
            return(fmt.ToString());
        }
Пример #29
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            PrintCommonProperties(fmt);
            fmt.AddField(LogFieldNames.Price, Price);
            fmt.AddField(LogFieldNames.Quantity, Quantity);
            fmt.AddEnumField(LogFieldNames.Operation, Operation);
            fmt.AddEnumField(LogFieldNames.Type, Type);
            fmt.AddEnumField(LogFieldNames.ExecutionCondition, ExecutionCondition);
            fmt.AddField(LogFieldNames.IsMarketMakerOrder, IsMarketMakerOrder);
            fmt.AddField(LogFieldNames.Comment, Comment);
            return(fmt.ToString());
        }
Пример #30
0
        /// <summary>
        ///     Вывести объект в лог
        /// </summary>
        public override string Print(PrintOption option)
        {
            var fmt = ObjectLogFormatter.Create(this, option);

            fmt.AddField(LogFieldNames.TransactionId, TransactionId);
            fmt.AddFieldRequired(LogFieldNames.ExchangeOrderId, OrderExchangeId);
            fmt.AddField(LogFieldNames.Time, ChangeTime);
            fmt.AddEnumField(LogFieldNames.State, State);
            fmt.AddField(LogFieldNames.Price, Price);
            fmt.AddField(LogFieldNames.Quantity, Quantity);
            fmt.AddField(LogFieldNames.ActiveQuantity, ActiveQuantity);
            fmt.AddField(LogFieldNames.FilledQuantity, FilledQuantity);
            return(fmt.ToString());
        }