Example #1
0
        public object Clone()
        {
            TickData bid = new TickData();

            bid.Code      = Code;
            bid.High      = High;
            bid.Low       = Low;
            bid.Open      = Open;
            bid.LastClose = LastClose;

            bid.CurrentPrice = CurrentPrice;
            bid.Turnover     = Turnover;
            bid.Volumn       = Volumn;
            bid.PushTime     = PushTime;

            bid.buyList = new List <GoodsData>();
            buyList.AsParallel <GoodsData>().ForAll(d =>
            {
                bid.buyList.Add(d.DeepClone());
            });

            bid.sellList = new List <GoodsData>();
            sellList.AsParallel <GoodsData>().ForAll(d =>
            {
                bid.sellList.Add(d.DeepClone());
            });

            return(bid);
        }
Example #2
0
 public void Enqueue(TickData obj)
 {
     bids.Insert(0, obj);
     queue.Enqueue(obj);
     lastData = obj;
     if (OnBidChange != null)
     {
         OnBidChange(this, obj);
     }
 }
Example #3
0
 public void Enqueue(TickData obj)
 {
     bids.Insert(0, obj);
     queue.Enqueue(obj);
     lastData = obj;
     if (OnBidChange != null)
     {
         OnBidChange(this, obj);
     }
 }
Example #4
0
        public object Clone()
        {
            TickData bid = new TickData();
            bid.Code = Code;
            bid.High = High;
            bid.Low = Low;
            bid.Open = Open;
            bid.LastClose = LastClose;

            bid.CurrentPrice = CurrentPrice;
            bid.Turnover = Turnover;
            bid.Volumn = Volumn;
            bid.PushTime = PushTime;

            bid.buyList = new List<GoodsData>();
            buyList.AsParallel<GoodsData>().ForAll(d=>
            {
                bid.buyList.Add(d.DeepClone());
            });

            bid.sellList = new List<GoodsData>();
            sellList.AsParallel<GoodsData>().ForAll(d =>
            {
                bid.sellList.Add(d.DeepClone());
            });

            return bid;
        }
Example #5
0
 /// <summary>
 /// Bar数据达到
 /// </summary>
 /// <param name="data"></param>
 private void _barData(TickData data)
 {
     strategy.OnBarData();
 }
Example #6
0
 private void _tickData(TickData data)
 {
     strategy.OnTickData();
 }