private void initializeTelegram() { try { if (this.Robot.IsBacktesting) { _nooptelegramClient = new NoopTelegram(); } else { _telegramClient = new StrategyTelegram(this); } } catch (Exception ex) { Robot.Print("StrategyBase: Error starting telegram client {0}", ex.Message); } }
public void Dispose() { if (_telegramClient != null) { _telegramClient.Dispose(); _telegramClient = null; } _onBarModules.Clear(); _onTickModules.Clear(); _allModules.Clear(); _orderSpacingModules.Clear(); _takeProfitModule = null; _stopLossModule = null; _lotSizeModule = null; foreach (var pipeline in _orderPipelines) { pipeline.Dispose(); } _orderPipelines.Clear(); }