예제 #1
0
 /// <summary>
 /// Создать <see cref="QuikTrans2QuikAdapter"/>.
 /// </summary>
 /// <param name="sessionHolder">Контейнер для сессии.</param>
 public QuikTrans2QuikAdapter(QuikSessionHolder sessionHolder)
     : base(MessageAdapterTypes.Transaction, sessionHolder)
 {
     Platform = Platforms.x86;
     SessionHolder.DllNameChanged  += ResetApi;
     SessionHolder.TerminalChanged += ResetApi;
 }
예제 #2
0
        /// <summary>
        /// Создать <see cref="QuikTrader"/>.
        /// </summary>
        /// <param name="path">Путь к директории, где установлен Quik (или путь к файлу info.exe).</param>
        public QuikTrader(string path)
        {
            _sessionHolder = new QuikSessionHolder(TransactionIdGenerator)
            {
                Path = path
            };
            _trans2QuikAdapter = new QuikTrans2QuikAdapter(_sessionHolder);
            _ddeAdapter        = new QuikDdeAdapter(_sessionHolder);

            _luaTransactionAdapter = new LuaFixTransactionMessageAdapter(_sessionHolder);
            _luaMarketDataAdapter  = new FixMessageAdapter(MessageAdapterTypes.MarketData, _sessionHolder, _sessionHolder.MarketDataSession);

            SessionHolderOnIsLuaChanged();
            _sessionHolder.IsLuaChanged += SessionHolderOnIsLuaChanged;

            ApplyMessageProcessor(MessageDirections.In, true, false);
            ApplyMessageProcessor(MessageDirections.In, false, true);
            ApplyMessageProcessor(MessageDirections.Out, true, true);
        }