Example #1
0
        private string _getTickFileName(string strKey)
        {
            string strPath = QuantTraderGlobals.GetInstance().QuantTraderConfig.DataPath.Minute;

            if (string.IsNullOrEmpty(strPath))
            {
                strPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Data\\Tick");
                _createDir(strPath);
            }
            else if (strPath.Contains(':'))
            {
                if (!System.IO.Directory.Exists(strPath))
                {
                    _createDir(strPath);
                }
            }
            else
            {
                strPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, strPath);
                _createDir(strPath);
            }

            string fileName = Path.Combine(strPath, strKey + ".tick");

            return(fileName);
        }
Example #2
0
        private void SubscribeMarketData()
        {
            int iResult = api.SubscribeMarketData(QuantTraderGlobals.GetInstance().QuantTraderConfig.SubscribeMarketDatas.ToArray());

            _logger.Info("--->>> 发送行情订阅请求: " + ((iResult == 0) ? "成功" : "失败"));
        }