private void SmartComServerConnected() { WriteToLog("Server connected"); Form.WriteToStatus("Server connected"); IsDisconnectedByUser = false; InitializeUpdatePositionTimer(); InitializeCheckEndOfDayTimer(); InitializePingTimer(); try { SmartComServer.ListenPortfolio(Portfolio); } catch (Exception e) { throw new SmartException(ExceptionImportanceLevel.MEDIUM, "SmartComServerConnected", "Server", "Cannot Listen Portfolio."); } foreach (StrategyAbst strat in Strategies.ToList()) { ListenSymbol(strat.Symbol); } //System.Threading.Thread.Sleep(5000); foreach (StrategyAbst strat in Strategies.ToList()) { strat.StartWork(); } //GetOrdersAndPositionFromServer(); }
private void SmartComServerConnected() { WriteToLog("Server connected"); Form.WriteToStatus("Server connected"); IsDisconnectedByUser = false; SmartComServer.ListenPortfolio(Portfolio); foreach (StrategyAbst strat in Strategies.ToList()) { ListenSymbol(strat.Symbol); } }
private void SmartComServerConnected() { WriteToLog("Server connected"); InformUser("Server connected"); IsDisconnectedByUser = false; SmartComServer.ListenPortfolio(Portfolio); foreach (string symbol in Symbols) { ListenSymbol(symbol); } InitializeTimers(); }