| | |
| | | if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam())); |
| | | } else { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | // profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | } |
| | | } |
| | | //回报率 |
| | |
| | | if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam())); |
| | | } else { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | // profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | } |
| | | } |
| | | //回报率 |
| | |
| | | contractOrderEntity.setClosingFeeAmount(order.getOpeningFeeAmount()); |
| | | contractOrderEntity.setClosingPrice(closePrice); |
| | | contractOrderEntity.setClosingType(7); |
| | | contractOrderEntity.setOrderType(ContractOrderEntity.ORDER_TYPE_CLOSE_MORE); |
| | | contractOrderEntity.setOrderType(ContractOrderEntity.ORDER_TYPE_CLOSE_LESS); |
| | | BigDecimal totalReturn = BigDecimal.ZERO; |
| | | contractOrderService.save(contractOrderEntity); |
| | | |
| | |
| | | if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam())); |
| | | } else { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | // profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | } |
| | | } |
| | | //回报率 |
| | |
| | | if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam())); |
| | | } else { |
| | | profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | // profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam())); |
| | | } |
| | | } |
| | | //回报率 |