Ejemplo n.º 1
0
 public static IFeedCandle ToCandle(this CandleItem candle, bool isBuy, DateTime baseTime, TimeInterval interval)
 {
     if (candle != null)
     {
         return(new FeedCandle
         {
             Open = candle.Open,
             Close = candle.Close,
             High = candle.High,
             Low = candle.Low,
             IsBuy = isBuy,
             DateTime = baseTime.AddIntervalTicks(candle.Tick, interval)
         });
     }
     return(null);
 }
Ejemplo n.º 2
0
        public void MergeCandle(CandleItem candle, TimeInterval interval)
        {
            var fc = candle.ToCandle(PriceType == PriceType.Bid, DateTime, interval);

            MergeCandle(fc, interval);
        }