Beispiel #1
0
        protected override void ApplySettings(HydraTaskSettings settings)
        {
            _settings = new FixSettings(settings);

            if (settings.IsDefault)
            {
                _settings.MarketDataSession = new FixMessageAdapter(new IncrementalIdGenerator());
            }
        }
Beispiel #2
0
        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;
            }));
        }
Beispiel #3
0
        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;
            }));
        }