コード例 #1
0
ファイル: IBTask.cs プロジェクト: zjxbetter/StockSharp
        protected override void ApplySettings(HydraTaskSettings settings)
        {
            _settings = new IBSettings(settings);

            if (!settings.IsDefault)
            {
                return;
            }

            _settings.Address               = InteractiveBrokersMessageAdapter.DefaultAddress;
            _settings.IsDownloadNews        = true;
            _settings.ClientId              = 0;
            _settings.ServerLogLevel        = ServerLogLevels.System;
            _settings.SupportedLevel1Fields = Enumerator.GetValues <Level1Fields>();
        }
コード例 #2
0
        protected override MarketDataConnector <IBTrader> CreateConnector(HydraTaskSettings settings)
        {
            _settings = new IBSettings(settings);

            if (settings.IsDefault)
            {
                _settings.Address               = InteractiveBrokersMessageAdapter.DefaultAddress;
                _settings.IsDownloadNews        = true;
                _settings.ClientId              = 0;
                _settings.ServerLogLevel        = ServerLogLevels.System;
                _settings.SupportedLevel1Fields = Enumerator.GetValues <Level1Fields>();
            }

            return(new MarketDataConnector <IBTrader>(EntityRegistry.Securities, this, () => new IBTrader
            {
                Address = _settings.Address,
                ClientId = _settings.ClientId,
                ServerLogLevel = _settings.ServerLogLevel
            }));
        }