コード例 #1
0
ファイル: Tick.cs プロジェクト: lulzzz/HedgeHog
        /// <summary>
        /// Compares the tick with the FX Core's rate.
        /// </summary>
        public bool Equals(FXCore.MarketRateAut rate)
        {
            if (rate == null)
            {
                throw new ArgumentNullException("rate");
            }
            if (rate.Period != "t1")
            {
                throw new ArgumentException("Rate shall be tick rate", "rate");
            }

            int rc = mDateTime.CompareTo(rate.StartDate);

            return(rc == 0 && mAsk == rate.AskOpen && mBid == rate.BidOpen);
        }
コード例 #2
0
ファイル: Tick.cs プロジェクト: lulzzz/HedgeHog
        /// <summary>
        /// Constructor.
        /// </summary>
        public Tick(FXCore.MarketRateAut rate)
        {
            if (rate == null)
            {
                throw new ArgumentNullException("rate");
            }
            if (rate.Period != "t1")
            {
                throw new ArgumentException("Rate shall be tick rate", "rate");
            }

            mDateTime = rate.StartDate;
            mAsk      = rate.AskOpen;
            mBid      = rate.BidOpen;
        }