Esempio n. 1
0
 public static void InitSpot(KlineDataPool kdp)
 {
     using (OptionDbCtx db = new OptionDbCtx())
     {
         var l = db.Ohlcs.Where(a => a.WhatId < 0).OrderByDescending(a => a.Id).Take(1000);
         foreach (var v in l)
         {
             kdp.Add(v);
         }
     }
 }
Esempio n. 2
0
 public static void InitOption(KlineDataPool kdp, List <int> cids)
 {
     using (OptionDbCtx db = new OptionDbCtx())
     {
         var l = db.Ohlcs.Where(a => a.WhatId > 0 && cids.Contains(a.WhatId)).OrderByDescending(a => a.Id).Take(1000).ToList();
         l.Reverse();
         foreach (var v in l)
         {
             kdp.Add(v);
         }
     }
 }
Esempio n. 3
0
 void OhlcMaker_OnOhlcMaked(Ohlc obj)
 {
     kdp.Add(obj);
     ohlcSaver.Save(obj);
 }