Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            var entity = obj as DBTStkDailyEntity;

            if (entity == null)
            {
                return(false);
            }
            return(Code.Equals(entity.Code) && Time.Equals(entity.Date) && Open.Equals(entity.Open) && Close.Equals(entity.Close));
        }
Exemplo n.º 2
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)
                 ));
        }
Exemplo n.º 3
0
        public override bool Equals(object obj)
        {
            var candle2 = obj as Candle;

            return(candle2 != null &&
                   Time.Equals(candle2.Time) &&
                   Open.Equals(candle2.Open) &&
                   Close == candle2.Close &&
                   High == candle2.High &&
                   Low == candle2.Low &&
                   Math.Abs(Volume - candle2.Volume) < Constants.Epsilon);
        }
 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));
 }
        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);
        }
Exemplo n.º 6
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));
 }