private bool IsDllConnected()
        {
            int           errCode;
            StringBuilder errorMessageBuilder = new StringBuilder(512);

            return(T2Q.TRANS2QUIK_IS_DLL_CONNECTED(out errCode, errorMessageBuilder, 512) == 10);
        }
        private bool BreakConnectionToQuik()
        {
            int           errCode;
            StringBuilder errorMessageBuilder = new StringBuilder(512);

            return(T2Q.TRANS2QUIK_DISCONNECT(out errCode, errorMessageBuilder, 512) == 0);
        }
        private bool SetConnectionToQuik()
        {
            int           errCode;
            StringBuilder errorMessageBuilder = new StringBuilder(512);

            return(T2Q.TRANS2QUIK_CONNECT(terminalPath, out errCode, errorMessageBuilder, 512) == 0);
        }
        private double SendSyncTransactionToQuik(string inputParams)
        {
            int           errCode;
            int           replCode;
            uint          transID;
            double        orderNum;
            StringBuilder statusStringBuilder = new StringBuilder(512);
            StringBuilder errorMessageBuilder = new StringBuilder(512);

            T2Q.TRANS2QUIK_SEND_SYNC_TRANSACTION(inputParams, out replCode, out transID, out orderNum,
                                                 statusStringBuilder, 512, out errCode, errorMessageBuilder, 512);

            //switch (errCode)
            //{
            //    case (int)T2QResultsCode.Failed:
            //        throw new System.NotImplementedException();
            //    default:
            //        throw new System.NotImplementedException();
            //}


            Console.WriteLine();
            Console.WriteLine("QUIK MESSAGE BEGINS");
            Console.WriteLine("error code: " + errCode);
            Console.WriteLine("reply code: " + replCode);
            Console.WriteLine("trans id: " + transID);
            Console.WriteLine("order id: " + orderNum);
            Console.WriteLine("status message: " + statusStringBuilder);
            Console.WriteLine("error message: " + errorMessageBuilder);
            Console.WriteLine("QUIK MESSAGE ENDS");
            Console.WriteLine();

            return(orderNum);
        }
 public double TestUnsubscribeTrades()
 {
     return(T2Q.TRANS2QUIK_UNSUBSCRIBE_TRADES());
 }
 public double TestStartGetTrades()
 {
     return(T2Q.TRANS2QUIK_START_TRADES(TradesCallBack));
 }
 public double TestSubscribeTrades(string classCode, string secCode)
 {
     return(T2Q.TRANS2QUIK_SUBSCRIBE_TRADES(classCode, secCode));
 }
 public double TestUnsubscribeOrders()
 {
     return(T2Q.TRANS2QUIK_UNSUBSCRIBE_ORDERS());
 }
 public double TestStartGetOrders()
 {
     return(T2Q.TRANS2QUIK_START_ORDERS(OrdersCallBack));
 }
 public double TestSubscribeOrders(string classCode, string secCode)
 {
     return(T2Q.TRANS2QUIK_SUBSCRIBE_ORDERS(classCode, secCode));
 }