public int LeadingContracts = 1;                        // number of leading contracts to load (if InstrumentName.IsProduct = true)



        #region IStringifiable
        // *********************************************************
        // ****                 IStringifiable                  ****
        // *********************************************************
        string IStringifiable.GetAttributes()
        {
            StringBuilder s = new StringBuilder();

            s.AppendFormat("InstrumentName={0}", InstrumentName.Serialize(this.InstrumentName));
            s.AppendFormat("Leading={0}", this.LeadingContracts);
            return(s.ToString());
        }
Example #2
0
        //
        #endregion


        #region IStringifiable Implementation
        // *****************************************************************
        // ****                     IStringifiable                      ****
        // *****************************************************************
        public string GetAttributes()
        {
            StringBuilder s = new StringBuilder();

            s.AppendFormat("InstrumentName={0}", InstrumentName.Serialize(m_Name));
            s.AppendFormat(" CurrencyName={0}", CurrencyName);
            s.AppendFormat(" RealGain={0} RealStartingGain={1}", m_RealizedGain, m_RealizedStartingGain);
            s.AppendFormat(" CurrencyRate={0}", CurrencyRate);
            return(s.ToString());
        }
Example #3
0
        }// UpdatePositionInfo().

        //
        //
        //
        //
        #endregion//Private Methods



        #region IStringifiable Implementation
        // *****************************************************************
        // ****                     IStringifiable                      ****
        // *****************************************************************
        public string GetAttributes()
        {
            StringBuilder s = new StringBuilder();

            s.AppendFormat("InstrumentName={0}", InstrumentName.Serialize(this.Name));
            s.AppendFormat(" DollarPerPoint={0} SmallestFillPriceIncr={1}", m_DollarPerPoint, m_SmallestFillPriceIncr);
            s.AppendFormat(" LocalTimeLast={0} ExchangeTimeLast={1}", LocalTimeLast.ToString("yyyy-MM-dd HH:mm:ss.fff zzz"), ExchangeTimeLast.ToString("yyyy-MM-dd HH:mm:ss.fff zzz"));
            s.AppendFormat(" RealGain={0} RealStartingGain={1}", m_RealizedGain, m_RealizedStartingGain);
            s.AppendFormat(" Volume={0} StartingVolume={1}", m_Volume, m_StartingVolume);
            return(s.ToString());
            //return string.Format("InstrumentName={4} DollarPerPoint={0} SmallestFillPriceIncr={1} LocalTimeLast={2} ExchangeTimeLast={3} RealGain={5} RealStartingGain={6}"
            //    , m_DollarPerPoint, m_SmallestFillPriceIncr, LocalTimeLast.ToString("yyyy-MM-dd HH:mm:ss.fff zzz")
            //    , ExchangeTimeLast.ToString("yyyy-MM-dd HH:mm:ss.fff zzz"),InstrumentName.Serialize(this.Name) , m_RealizedGain, m_RealizedStartingGain);
        }
Example #4
0
        //
        #endregion//Public Methods


        #region no Private Methods
        // *****************************************************************
        // ****                     Private Methods                     ****
        // *****************************************************************
        //
        //
        #endregion//Private Methods


        #region IStringifiable
        // *****************************************************************
        // ****                     IStringifiable                      ****
        // *****************************************************************
        //
        //
        public string GetAttributes()
        {
            StringBuilder s = new StringBuilder();

            s.AppendFormat("InstrumentName={0}", InstrumentName.Serialize(this.InstrumentName));
            s.AppendFormat(" PriceMultiplier={0}", this.PriceMultiplier);
            s.AppendFormat(" Weight={0}", this.Weight);
            s.AppendFormat(" IsPriceEngineLeg={0}", this.IsPriceEngineLeg);
            if (!string.IsNullOrEmpty(this.UserTag))
            {
                if (this.UserTag.Contains("="))
                {
                    throw new Exception("PriceLeg UserTag contains illegal characters.");
                }
                s.AppendFormat(" UserTag={0}", this.UserTag);
            }
            return(s.ToString());
        }
        }// ToString()

        //
        //
        //
        //
        //
        #endregion//Public Methods


        #region IStringifiable Implementation
        // *****************************************************************
        // ****                    IStringifiable                       ****
        // *****************************************************************
        //
        public string GetAttributes()
        {
            return(string.Format("InstrumentName={2} Reason={0} Message={1}", this.Reason, this.Message, InstrumentName.Serialize(m_Name)));
        }
Example #6
0
        //
        //
        //
        //
        //
        #endregion//Public Methods



        #region IStringifiable
        public string GetAttributes()
        {
            return(string.Format("Name={0} Key={1}", InstrumentName.Serialize(this.Name), Key.ToString()));
        }