Пример #1
0
 /// <summary>
 /// 增加一个策略,和关注的股票价格
 /// </summary>
 /// <param name="code">股票代码</param>
 /// <param name="strategy">策略实例</param>
 public void AddStock(String code, IStrategy strategy)
 {
     if (stockDataCache[code] == null)
     {
         stockDataCache[code] = new StockDataQueue();
     }
     stockDataCache[code].OnStockDataChange += strategy.OnStockDataChanged;
 }
Пример #2
0
 /// <summary>
 /// 增加一个策略,和关注的股票价格
 /// </summary>
 /// <param name="code">股票代码</param>
 /// <param name="strategy">策略实例</param>
 public void AddStock(String code, IStrategy strategy)
 {
     if (stockDataCache[code] == null)
     {
         stockDataCache[code] = new StockDataQueue();
     }
     stockDataCache[code].OnStockDataChange += strategy.OnStockDataChanged;
 }