protected override void ApplySettings(HydraTaskSettings settings) { _settings = new FixSettings(settings); if (settings.IsDefault) { _settings.MarketDataSession = new FixMessageAdapter(new IncrementalIdGenerator()); } }
protected override MarketDataConnector <FixTrader> CreateTrader(HydraTaskSettings settings) { _settings = new FixSettings(settings); if (settings.IsDefault) { _settings.MarketDataSession = new FixSession(); } return(new MarketDataConnector <FixTrader>(EntityRegistry.Securities, this, () => { var trader = new FixTrader(); trader.MarketDataSession.Load(_settings.MarketDataSession.Save()); return trader; })); }
protected override MarketDataConnector <FixTrader> CreateConnector(HydraTaskSettings settings) { _settings = new FixSettings(settings); if (settings.IsDefault) { _settings.MarketDataSession = new FixMessageAdapter(new IncrementalIdGenerator()); } return(new MarketDataConnector <FixTrader>(EntityRegistry.Securities, this, () => { var trader = new FixTrader(); trader.MarketDataAdapter.Load(_settings.MarketDataSession.Save()); if (!this.IsExecLogEnabled()) { trader.Adapter.InnerAdapters.Remove(trader.TransactionAdapter); } return trader; })); }