コード例 #1
0
        protected override MarketDataConnector <SmartTrader> CreateTrader(HydraTaskSettings settings)
        {
            _settings = new SmartComSettings(settings);

            if (settings.IsDefault)
            {
                _settings.Address    = SmartComAddresses.Matrix;
                _settings.Login      = string.Empty;
                _settings.Password   = new SecureString();
                _settings.IsVersion3 = true;
            }

            return(new MarketDataConnector <SmartTrader>(EntityRegistry.Securities, this, () =>
            {
                var trader = new SmartTrader
                {
                    Login = _settings.Login,
                    Password = _settings.Password.To <string>(),
                    Address = _settings.Address,
                    Version = _settings.IsVersion3 ? SmartComVersions.V3 : SmartComVersions.V2
                };

                return trader;
            }));
        }
コード例 #2
0
        protected override void ApplySettings(HydraTaskSettings settings)
        {
            _settings = new SmartComSettings(settings);

            if (!settings.IsDefault)
            {
                return;
            }

            _settings.Address    = SmartComAddresses.Matrix;
            _settings.Login      = string.Empty;
            _settings.Password   = new SecureString();
            _settings.IsVersion3 = true;
        }