| | |
| | | BigDecimal triggerPrice = newEntryGrid.getGridPrice(); |
| | | int posSize = Math.min(queryPositionSize(Position.ModeEnum.DUAL_LONG), longPositionSize.intValue()); |
| | | int maxPos = config.getMaxPositionSize(); |
| | | int targetAmount = sameGrid ? Integer.parseInt(config.getQuantity()) : accumulatedLongLossCount + 1; |
| | | int targetAmount = sameGrid ? Integer.parseInt(config.getQuantity()) : (accumulatedLongLossCount + 1) * Integer.parseInt(config.getQuantity()); |
| | | int addSize; |
| | | if (maxPos > 0) { |
| | | int remainingRoom = maxPos - posSize; |
| | |
| | | BigDecimal triggerPrice = newEntryGrid.getGridPrice(); |
| | | int posSize = Math.min(queryPositionSize(Position.ModeEnum.DUAL_SHORT), shortPositionSize.intValue()); |
| | | int maxPos = config.getMaxPositionSize(); |
| | | int targetAmount = sameGrid ? Integer.parseInt(config.getQuantity()) : accumulatedShortLossCount + 1; |
| | | int targetAmount = sameGrid ? Integer.parseInt(config.getQuantity()) : (accumulatedShortLossCount + 1) * Integer.parseInt(config.getQuantity()); |
| | | int addSize; |
| | | if (maxPos > 0) { |
| | | int remainingRoom = maxPos - posSize; |