/// <summary> /// Stops custom strategy execution /// </summary> public void StopStrategy() { try { // Verify Strategy Instance if (_tradeHubStrategy != null) { if (_asyncClassLogger.IsInfoEnabled) { _asyncClassLogger.Info("Stopping user strategy execution: " + _strategyType.FullName, _type.FullName, "StopStrategy"); } // Start Executing the strategy _tradeHubStrategy.Stop(); } else { if (_asyncClassLogger.IsInfoEnabled) { _asyncClassLogger.Info("User strategy not initialized: " + _strategyType.FullName, _type.FullName, "StopStrategy"); } } } catch (Exception exception) { _asyncClassLogger.Error(exception, _type.FullName, "StopStrategy"); } }
public void Close() { if (_tradeHubStrategy.IsRunning) { _tradeHubStrategy.Stop(); } //_applicationController.StopServer(); }