protected override void DoTask()
        {
            TcpClient client = listener.AcceptTcpClient();
            ConnectionTradingOnServer connection = new ConnectionTradingOnServer(client, Handler);

            connection.Start();
        }
 private void HandleRequestAccountOnTimer(ConnectionTradingOnServer client, RequestAccountOnTimer request)
 {
     //request.Bid, request.Ask
     //    ser
     Console.WriteLine(request.Bid + " " + request.Ask);
     client.Send(new ResponseAccountOnTick(new TradingOrderCommand(TradingOrderType.Long, 1.0, 1.0, 0.0, 0.0, 2.0)));
 }
 private void HandleRequestConnectProvideIndicator(ConnectionTradingOnServer client, RequestConnectProvideIndicator request)
 {
     throw new NotImplementedException();
 }
 private void HandleRequestAccountOnTick(ConnectionTradingOnServer client, RequestAccountOnTick request)
 {
     throw new NotImplementedException();
 }
 private void HandleRequestDisconnect(ConnectionTradingOnServer client, RequestDisconnect request)
 {
     throw new NotImplementedException();
 }
 public void Enqueue(ConnectionTradingOnServer source, ARequest request)
 {
     RequestQueue.Enqueue(new Tuple <ConnectionTradingOnServer, ARequest>(source, request));
 }