Exemplo n.º 1
0
 public override void OnSecuritiesChanged(SecurityChanges changes)
 {
     foreach (var tmp in UniverseManager.ActiveSecurities)
     {
         Symbol _symbol = tmp.Key;
         if (!allSymbols.ContainsKey(_symbol))
         {
             IndicatorSet iSet = new IndicatorSet(this, _symbol, strategySignals);
             iSet.AddIndicators();
             allSymbols.Add(_symbol, iSet);
             Streaks.Add(_symbol, new Streak());
             if (DoDebug)
             {
                 Debug("Added instrument: " + _symbol.Value.ToString());
             }
         }
     }
     _universeChanges = changes;
     foreach (var tmp in changes.RemovedSecurities)
     {
         Liquidate(tmp.Symbol, "Removed");
     }
 }