/// <summary>
        /// 
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        internal TradingServer.ClientBusiness.Command ConvertStringToCommands(string value)
        {
            TradingServer.ClientBusiness.Command result = new ClientBusiness.Command();
            string[] subValue = value.Split('{');
            if (subValue.Length > 0)
            {
                result.CommandID = int.Parse(subValue[0]);
                result.OpenPrice = subValue[1];
                result.StopLoss = double.Parse(subValue[2]);
                result.TakeProfit = double.Parse(subValue[3]);
                result.Comment = subValue[4];
                result.LoginKey = subValue[5];
                result.InvestorID = int.Parse(subValue[6]);
            }

            return result;
        }
        /// <summary>
        /// CONVERT STRING TO COMMAND
        /// </summary>
        /// <param name="value">clientcode,investorid,openprice, size,sl, tp, symbol,comment, login key</param>
        /// <returns></returns>
        internal TradingServer.ClientBusiness.Command ConvertStringToCommand(string value)
        {
            TradingServer.ClientBusiness.Command result = new ClientBusiness.Command();
            string[] subValue = value.Split('{');
            if (subValue.Length > 0)
            {
                result.ClientCode = subValue[0];
                result.InvestorID = int.Parse(subValue[1]);
                result.OpenPrice = subValue[2];
                if (subValue[3] == "")
                    result.Size = 0;
                else
                    result.Size = double.Parse(subValue[3]);

                if (subValue[4] == "")
                    result.StopLoss = 0;
                else
                    result.StopLoss = double.Parse(subValue[4]);

                if (subValue[5] == "")
                    result.TakeProfit = 0;
                else
                    result.TakeProfit = double.Parse(subValue[5]);

                result.Symbol = subValue[6];
                result.Comment = subValue[7];
                result.LoginKey = subValue[8];
                //DayƱMonthƱYear
                //TAM THOI DEP BO THOI GIAN HET HAN VI LOI KHI KHONG THE UNESCAPE DUOC QUERYSTRING
                //string[] subDateTime = subValue[9].Split('Ʊ');
                //result.TimeExpiry = new DateTime(int.Parse(subDateTime[2]), int.Parse(subDateTime[1]),
                //                                    int.Parse(subDateTime[0]), 0, 0, 0);
            }

            return result;
        }