Beispiel #1
0
 public static void MergeCandles(this CandleTableEntity entity, IEnumerable <CandleItem> candles, TimeInterval interval)
 {
     foreach (var candle in candles)
     {
         entity.MergeCandle(candle, interval);
     }
 }
Beispiel #2
0
        public static void MergeCandle(this CandleTableEntity entity, CandleItem candle, TimeInterval interval)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            IFeedCandle fc = candle.ToCandle(entity.IsBuy, entity.DateTime, interval);

            entity.MergeCandle(fc, interval);
        }