private HydraQuikTrader CreateHydraQuikTrader() { var connector = new HydraQuikTrader { IsDde = _settings.IsDde, Path = _settings.Path, DdeServer = _settings.DdeServer, IsDownloadSecurityChangesHistory = _settings.IsDownloadSecurityChangesHistory, }; if (_settings.IsDde) { connector.TransactionAdapter = new HydraQuikTransactionAdapter((MessageSessionHolder)connector.TransactionAdapter.SessionHolder); } //Добавление выбранных колонок в экспорт if (!_settings.IsDownloadSecurityChangesHistory) { connector .SecuritiesTable .Columns .AddRange(DdeSecurityColumnsEditor.GetColumns(_settings.ExtendedColumns)); } else { connector .SecuritiesChangeTable .Columns .AddRange(DdeSecurityChangesColumnsEditor.GetColumns(_settings.ExtendedColumnsHistory)); } return(connector); }
private QuikTrader CreateHydraQuikTrader() { var connector = new QuikTrader { IsDde = _settings.IsDde, Path = _settings.Path, DdeServer = _settings.DdeServer, }; connector.DdeTables = new[] { connector.SecuritiesTable, connector.TradesTable, connector.OrdersTable, connector.StopOrdersTable, connector.MyTradesTable }; if (_settings.IsDownloadSecurityChangesHistory) { connector.DdeTables = connector.DdeTables.Concat(new[] { connector.SecuritiesChangeTable }); } //Добавление выбранных колонок в экспорт if (!_settings.IsDownloadSecurityChangesHistory) { connector .SecuritiesTable .Columns .AddRange(DdeSecurityColumnsEditor.GetColumns(_settings.ExtendedColumns)); } else { connector .SecuritiesChangeTable .Columns .AddRange(DdeSecurityChangesColumnsEditor.GetColumns(_settings.ExtendedColumnsHistory)); } return(connector); }
protected override IMessageAdapter GetAdapter(IdGenerator generator) { if (_settings.IsDde) { var adapter = new QuikDdeAdapter(generator) { //Path = _settings.Path, DdeServer = _settings.DdeServer, //OverrideDll = _settings.OverrideDll }; adapter.Tables = new[] { adapter.SecuritiesTable, adapter.TradesTable, adapter.OrdersTable, adapter.StopOrdersTable, adapter.MyTradesTable }; if (_settings.IsDownloadSecurityChangesHistory) { adapter.Tables = adapter.Tables.Concat(new[] { adapter.SecuritiesChangeTable }); } //Добавление выбранных колонок в экспорт if (!_settings.IsDownloadSecurityChangesHistory) { adapter .SecuritiesTable .Columns .AddRange(DdeSecurityColumnsEditor.GetColumns(_settings.ExtendedColumns)); } else { adapter .SecuritiesChangeTable .Columns .AddRange(DdeSecurityChangesColumnsEditor.GetColumns(_settings.ExtendedColumnsHistory)); } return(adapter); } else { return(new LuaFixMarketDataMessageAdapter(generator) { Address = _settings.LuaAddress, Login = _settings.LuaLogin, Password = _settings.LuaPassword }); } }
private QuikTrader CreateHydraQuikTrader() { var connector = new QuikTrader { IsDde = _settings.IsDde, Path = _settings.Path, DdeServer = _settings.DdeServer, LuaFixServerAddress = _settings.LuaAddress, OverrideDll = _settings.OverrideDll }; if (!_settings.LuaLogin.IsEmpty()) { connector.LuaLogin = _settings.LuaLogin; } if (!_settings.LuaPassword.IsEmpty()) { connector.LuaPassword = _settings.LuaPassword; } connector.DdeTables = new[] { connector.SecuritiesTable, connector.TradesTable, connector.OrdersTable, connector.StopOrdersTable, connector.MyTradesTable }; if (_settings.IsDownloadSecurityChangesHistory) { connector.DdeTables = connector.DdeTables.Concat(new[] { connector.SecuritiesChangeTable }); } //Добавление выбранных колонок в экспорт if (!_settings.IsDownloadSecurityChangesHistory) { connector .SecuritiesTable .Columns .AddRange(DdeSecurityColumnsEditor.GetColumns(_settings.ExtendedColumns)); } else { connector .SecuritiesChangeTable .Columns .AddRange(DdeSecurityChangesColumnsEditor.GetColumns(_settings.ExtendedColumnsHistory)); } return(connector); }