Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Создать <see cref="QuikTrader"/>.
        /// </summary>
        /// <param name="path">Путь к директории, где установлен Quik (или путь к файлу info.exe).</param>
        public QuikTrader(string path)
        {
            Path = path;

            _trans2QuikAdapter = new QuikTrans2QuikAdapter(TransactionIdGenerator);
            _ddeAdapter        = new QuikDdeAdapter(TransactionIdGenerator);

            _trans2QuikAdapter.GetTerminal = _ddeAdapter.GetTerminal = () => Terminal;

            _luaTransactionAdapter = new LuaFixTransactionMessageAdapter(TransactionIdGenerator)
            {
                Login        = "******",
                Password     = "******".To <SecureString>(),
                Address      = DefaultLuaAddress,
                TargetCompId = "StockSharpTS",
                SenderCompId = "quik",
                //ExchangeBoard = ExchangeBoard.Forts,
                Version = FixVersions.Fix44_Lua,
                RequestAllPortfolios = true,
                MarketData           = FixMarketData.None,
                UtcOffset            = TimeHelper.Moscow.BaseUtcOffset
            };

            _luaMarketDataAdapter = new FixMessageAdapter(TransactionIdGenerator)
            {
                Login        = "******",
                Password     = "******".To <SecureString>(),
                Address      = DefaultLuaAddress,
                TargetCompId = "StockSharpMD",
                SenderCompId = "quik",
                //ExchangeBoard = ExchangeBoard.Forts,
                Version = FixVersions.Fix44_Lua,
                RequestAllSecurities = true,
                MarketData           = FixMarketData.MarketData,
                UtcOffset            = TimeHelper.Moscow.BaseUtcOffset,
            };

            _luaMarketDataAdapter.RemoveTransactionalSupport();

            IsDde = false;
        }
Ejemplo n.º 3
0
		/// <summary>
		/// Создать <see cref="QuikTrader"/>.
		/// </summary>
		/// <param name="path">Путь к директории, где установлен Quik (или путь к файлу info.exe).</param>
		public QuikTrader(string path)
		{
			Path = path;

			_trans2QuikAdapter = new QuikTrans2QuikAdapter(TransactionIdGenerator);
			_ddeAdapter = new QuikDdeAdapter(TransactionIdGenerator);

			_trans2QuikAdapter.GetTerminal = _ddeAdapter.GetTerminal = () => Terminal;

			_luaTransactionAdapter = new LuaFixTransactionMessageAdapter(TransactionIdGenerator)
			{
				Login = "******",
				Password = "******".To<SecureString>(),
				Address = DefaultLuaAddress,
				TargetCompId = "StockSharpTS",
				SenderCompId = "quik",
				//ExchangeBoard = ExchangeBoard.Forts,
				Version = FixVersions.Fix44_Lua,
				RequestAllPortfolios = true,
				MarketData = FixMarketData.None,
				UtcOffset = TimeHelper.Moscow.BaseUtcOffset
			};

			_luaMarketDataAdapter = new FixMessageAdapter(TransactionIdGenerator)
			{
				Login = "******",
				Password = "******".To<SecureString>(),
				Address = DefaultLuaAddress,
				TargetCompId = "StockSharpMD",
				SenderCompId = "quik",
				//ExchangeBoard = ExchangeBoard.Forts,
				Version = FixVersions.Fix44_Lua,
				RequestAllSecurities = true,
				MarketData = FixMarketData.MarketData,
				UtcOffset = TimeHelper.Moscow.BaseUtcOffset,
			};

			_luaMarketDataAdapter.RemoveTransactionalSupport();

			IsDde = false;
		}