Example #1
0
        /// <summary>
        /// Инициализация перед началом торговой сессии.
        /// </summary>
        public void OpenSession()
        {
            _logger.AddInfo("LeechApp", "OpenSession");

            _instrumTable.Load();
            _accountTable.Load();

            // создание каталогов
            _sessionDbPath = _config.GetSessionDbPath(DateTime.Today);
            if (!Directory.Exists(_sessionDbPath))
            {
                Directory.CreateDirectory(_sessionDbPath);
            }

            _tickDispatcher.Initialize();
            _botsConfig.Load();
            _botManager.Initialize();
            _alorTrade.Initialize();
            _lpClientApp.Initialize();
            _logger.AddInfo("LeechApp", "Session opened");
        }