public ProtoOAClosePositionDetails CreateClosePositionDetails(double entryPrice, long profit, long swap, long commission, 
			long balance, long closedVolume, bool closedByStopOut, string comment = null)
        {
            var _obj = new ProtoOAClosePositionDetails();
            _obj.entryPrice = entryPrice;
            _obj.profit = profit;
            _obj.swap = swap;
            _obj.commission = commission;
            _obj.balance = balance;
            _obj.closedVolume = closedVolume;
            _obj.closedByStopOut = closedByStopOut;
            if (comment != null)
                _obj.comment = comment;
            return _obj;
        }
 static public string OpenApiClosePositionDetails(ProtoOAClosePositionDetails closePositionDetails)
 {
     return "ClosePositionDetails{entryPrice:" + closePositionDetails.entryPrice.ToString() +
         ", profit:" + closePositionDetails.profit.ToString() +
         ", swap:" + closePositionDetails.swap.ToString() +
         ", commission:" + closePositionDetails.commission.ToString() +
         ", balance:" + closePositionDetails.balance.ToString() +
         (closePositionDetails.commentSpecified ? ", comment:" + closePositionDetails.comment : "") +
         (closePositionDetails.stopLossPriceSpecified ? ", stopLossPrice:" + closePositionDetails.stopLossPrice.ToString() : "") +
         (closePositionDetails.takeProfitPriceSpecified ? ", takeProfitPrice:" + closePositionDetails.takeProfitPrice.ToString() : "") +
         (closePositionDetails.quoteToDepositConversionRateSpecified ? ", quoteToDepositConversionRate:" + closePositionDetails.quoteToDepositConversionRate.ToString() : "") +
         ", closedVolume:" + closePositionDetails.closedVolume.ToString() +
         ", closedByStopOut:" + (closePositionDetails.closedByStopOut ? "TRUE" : "FALSE") +
         "}";
 }