/// <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); }
/// <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; }