internal void UpdateSettingInfo(SignalSettingInfo settingInfo)
 {
     _configuresStocks.AsParallel().ForAll(s =>
     {
         s.UpdateSettingInfo(settingInfo);
     });
 }
 public BuySellStockOnSignal(BuySellOnSignalSymbolConfig config, KiteConnect.Kite kite, SignalSettingInfo signalSettingInfo)
 {
     _config            = config;
     _kite              = kite;
     _signalSettingInfo = signalSettingInfo;
     if (config.ReversalInfoes != null && config.ReversalInfoes.Any())
     {
         _reversalMultiplier = config.ReversalInfoes.GroupBy(s => s.ReversalNumber).ToDictionary(key => key.Key, value => value.FirstOrDefault().Multiplier);
     }
 }
        public void Start(BuySellOnSignalSymbolConfig stock, KiteConnect.Kite kite, SignalSettingInfo settingInfo)
        {
            var clonnedStock = stock.DeepCopy <BuySellOnSignalSymbolConfig>();

            clonnedStock.StartTime = stock.StartTime;
            var clonnedSetting = settingInfo != null?settingInfo.DeepCopy <SignalSettingInfo>() : new SignalSettingInfo();

            BuySellStockOnSignal signal = new BuySellStockOnSignal(clonnedStock, kite, clonnedSetting);

            var addedstock = _configuresStocks.FirstOrDefault(s => s.IsMatchSymbol(clonnedStock.Exchange, clonnedStock.Symbol));

            if (addedstock != null)
            {
                addedstock.Reset();
                _configuresStocks.Remove(addedstock);
            }
            _kite = kite;
            signal.Start();

            _configuresStocks.Add(signal);
        }
 internal void UpdateSettingInfo(SignalSettingInfo settingInfo)
 {
     _signalSettingInfo = settingInfo;
 }