Beispiel #1
0
        static void Main(string[] args)
        {
            var parameters = new ConnectorParameters(
                account: "MyAccount",
                pathToQuik: Terminal.GetPathToActiveQuik(),
                ddeServerName: "QServer");


            using (QConnector connector = new QConnector(parameters))
            {
                connector.Connected += (sender, e) => { Console.WriteLine("Connected."); };

                connector.ImportStarted += (sender, e) => { Console.WriteLine("Import started."); };

                connector.Connect();
                connector.StartImport();


                IDataTable<Security> securitiesTable = connector.AddDataTable<Security>();

                securitiesTable.Updated += securitiesTable_Updated;

                Console.ReadLine();


                OrderChannel lkoh = connector.CreateOrderChannel("LKOH", "EQBR");

                OrderResult result = lkoh.SendTransaction(Direction.Buy, 3000, 1);

                lkoh.KillOrder(OrderChannel.TransId, result.OrderNumber);

                Console.ReadLine();
            }

        }
Beispiel #2
0
 public QConnector(ConnectorParameters parameters)
 {
     _connection = new QuikConnection(parameters.PathToQuik, parameters.Account);
     _server     = new QDataServer(parameters.ServerName);
 }