Exemplo n.º 1
0
        private bool PlaceOrder(LimeFIXProvider target, SymbolInfo symbol, OrderType type,
                                int size, double price, out LogicalOrder logicalOrder, out CreateOrChangeOrderDefault priceOrder)
        {
            logicalOrder = Factory.Engine.LogicalOrder(symbol);
            logicalOrder.TradeDirection = TradeDirection.Entry;
            logicalOrder.Type           = type;
            logicalOrder.Price          = price;
            logicalOrder.Position       = size;

            priceOrder = new CreateOrChangeOrderDefault(OrderAction.Create, symbol, logicalOrder, OrderSide.Buy, logicalOrder.Position, logicalOrder.Price);

            return(target.OnCreateBrokerOrder(priceOrder));
        }
Exemplo n.º 2
0
        public void Initialize(Task t)
        {
            Console.WriteLine("Initialize");
            task = t;
            var agentPerformaner = Factory.Parallel.SpawnPerformer(typeof(LimeFIXProvider), "ClientTest");

            client = agentPerformaner as LimeFIXProvider;

            agentPerformaner = Factory.Parallel.SpawnPerformer(typeof(LimeFIXProvider), "MarketTest");
            market           = agentPerformaner as LimeFIXProvider;

            task.Start();
            Console.WriteLine("Task started");
        }