Exemple #1
0
        /// <summary>
        /// Returns true if OutputStockPriceResult instances are equal
        /// </summary>
        /// <param name="other">Instance of OutputStockPriceResult to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OutputStockPriceResult other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Date == other.Date ||
                     Date != null &&
                     Date.Equals(other.Date)
                     ) &&
                 (
                     Symbol == other.Symbol ||
                     Symbol != null &&
                     Symbol.Equals(other.Symbol)
                 ) &&
                 (
                     Exchange == other.Exchange ||
                     Exchange != null &&
                     Exchange.Equals(other.Exchange)
                 ) &&
                 (
                     Open == other.Open ||

                     Open.Equals(other.Open)
                 ) &&
                 (
                     High == other.High ||

                     High.Equals(other.High)
                 ) &&
                 (
                     Low == other.Low ||

                     Low.Equals(other.Low)
                 ) &&
                 (
                     Close == other.Close ||

                     Close.Equals(other.Close)
                 ) &&
                 (
                     Volume == other.Volume ||

                     Volume.Equals(other.Volume)
                 ));
        }
 protected bool Equals(HistoricalBar other)
 {
     return(Timestamp.Equals(other.Timestamp) &&
            High.Equals(other.High) &&
            Low.Equals(other.Low) &&
            Open.Equals(other.Open) &&
            Close.Equals(other.Close) &&
            TotalVolume == other.TotalVolume &&
            PeriodVolume == other.PeriodVolume &&
            TotalTrade == other.TotalTrade &&
            PeriodTrade == other.PeriodTrade &&
            VWAP.Equals(other.VWAP));
 }
        /// <summary>
        /// Returns true if ForecastTemperature instances are equal
        /// </summary>
        /// <param name="other">Instance of ForecastTemperature to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ForecastTemperature other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Low == other.Low ||
                     Low != null &&
                     Low.Equals(other.Low)
                     ) &&
                 (
                     High == other.High ||
                     High != null &&
                     High.Equals(other.High)
                 ) &&
                 (
                     Morning == other.Morning ||
                     Morning != null &&
                     Morning.Equals(other.Morning)
                 ) &&
                 (
                     Day == other.Day ||
                     Day != null &&
                     Day.Equals(other.Day)
                 ) &&
                 (
                     Evening == other.Evening ||
                     Evening != null &&
                     Evening.Equals(other.Evening)
                 ) &&
                 (
                     Night == other.Night ||
                     Night != null &&
                     Night.Equals(other.Night)
                 ));
        }
        public bool Equals(Candle other)
        {
            if (ReferenceEquals(null, other))
            {
                return false;
            }
            if (ReferenceEquals(this, other))
            {
                return true;
            }

            return string.Equals(AssetPairId, other.AssetPairId) &&
                   PriceType == other.PriceType &&
                   TimeInterval == other.TimeInterval &&
                   Timestamp.Equals(other.Timestamp) &&
                   LatestChangeTimestamp.Equals(other.LatestChangeTimestamp) &&
                   Open.Equals(other.Open) &&
                   Close.Equals(other.Close) &&
                   High.Equals(other.High) &&
                   Low.Equals(other.Low) &&
                   TradingVolume.Equals(other.TradingVolume) &&
                   TradingOppositeVolume.Equals(other.TradingOppositeVolume);
        }
Exemple #5
0
 private bool Equals(Stock other)
 {
     return(Date.Date.Equals(other.Date.Date) && Open.Equals(other.Open) && High.Equals(other.High) && Low.Equals(other.Low) && Close.Equals(other.Close) && AdjClose.Equals(other.AdjClose) && Volume.Equals(other.Volume));
 }
Exemple #6
0
 protected bool Equals(TemperatureRange other)
 {
     return(High.Equals(other.High) && Low.Equals(other.Low) && Average.Equals(other.Average));
 }
        /// <summary>
        /// Returns true if BookSummary instances are equal
        /// </summary>
        /// <param name="other">Instance of BookSummary to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(BookSummary other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     UnderlyingIndex == other.UnderlyingIndex ||
                     UnderlyingIndex != null &&
                     UnderlyingIndex.Equals(other.UnderlyingIndex)
                     ) &&
                 (
                     Volume == other.Volume ||
                     Volume != null &&
                     Volume.Equals(other.Volume)
                 ) &&
                 (
                     VolumeUsd == other.VolumeUsd ||
                     VolumeUsd != null &&
                     VolumeUsd.Equals(other.VolumeUsd)
                 ) &&
                 (
                     UnderlyingPrice == other.UnderlyingPrice ||
                     UnderlyingPrice != null &&
                     UnderlyingPrice.Equals(other.UnderlyingPrice)
                 ) &&
                 (
                     BidPrice == other.BidPrice ||
                     BidPrice != null &&
                     BidPrice.Equals(other.BidPrice)
                 ) &&
                 (
                     OpenInterest == other.OpenInterest ||
                     OpenInterest != null &&
                     OpenInterest.Equals(other.OpenInterest)
                 ) &&
                 (
                     QuoteCurrency == other.QuoteCurrency ||
                     QuoteCurrency != null &&
                     QuoteCurrency.Equals(other.QuoteCurrency)
                 ) &&
                 (
                     High == other.High ||
                     High != null &&
                     High.Equals(other.High)
                 ) &&
                 (
                     EstimatedDeliveryPrice == other.EstimatedDeliveryPrice ||
                     EstimatedDeliveryPrice != null &&
                     EstimatedDeliveryPrice.Equals(other.EstimatedDeliveryPrice)
                 ) &&
                 (
                     Last == other.Last ||
                     Last != null &&
                     Last.Equals(other.Last)
                 ) &&
                 (
                     MidPrice == other.MidPrice ||
                     MidPrice != null &&
                     MidPrice.Equals(other.MidPrice)
                 ) &&
                 (
                     InterestRate == other.InterestRate ||
                     InterestRate != null &&
                     InterestRate.Equals(other.InterestRate)
                 ) &&
                 (
                     Funding8h == other.Funding8h ||
                     Funding8h != null &&
                     Funding8h.Equals(other.Funding8h)
                 ) &&
                 (
                     MarkPrice == other.MarkPrice ||
                     MarkPrice != null &&
                     MarkPrice.Equals(other.MarkPrice)
                 ) &&
                 (
                     AskPrice == other.AskPrice ||
                     AskPrice != null &&
                     AskPrice.Equals(other.AskPrice)
                 ) &&
                 (
                     InstrumentName == other.InstrumentName ||
                     InstrumentName != null &&
                     InstrumentName.Equals(other.InstrumentName)
                 ) &&
                 (
                     Low == other.Low ||
                     Low != null &&
                     Low.Equals(other.Low)
                 ) &&
                 (
                     BaseCurrency == other.BaseCurrency ||
                     BaseCurrency != null &&
                     BaseCurrency.Equals(other.BaseCurrency)
                 ) &&
                 (
                     CreationTimestamp == other.CreationTimestamp ||
                     CreationTimestamp != null &&
                     CreationTimestamp.Equals(other.CreationTimestamp)
                 ) &&
                 (
                     CurrentFunding == other.CurrentFunding ||
                     CurrentFunding != null &&
                     CurrentFunding.Equals(other.CurrentFunding)
                 ));
        }