Class PositionDTO.PositionDTOBuilder
java.lang.Object
tech.cassandre.trading.bot.dto.position.PositionDTO.PositionDTOBuilder
- Enclosing class:
- PositionDTO
-
Method Summary
Modifier and TypeMethodDescriptionamount
(CurrencyAmountDTO amount) Position amount.autoClose
(boolean autoClose) Indicates if the position should be closed automatically by Cassandre.build()
closingOrder
(OrderDTO closingOrder) The order created to close the position.currencyPair
(CurrencyPairDTO currencyPair) Currency pair.forceClosing
(boolean forceClosing) Indicates that the position must be closed no matter the rules.highestGainPrice
(CurrencyAmountDTO highestGainPrice) Price of the highest gain reached by this position.latestGainPrice
(CurrencyAmountDTO latestGainPrice) Price of the latest gain price for this position.lowestGainPrice
(CurrencyAmountDTO lowestGainPrice) Price of the lowest gain reached by this position.openingOrder
(OrderDTO openingOrder) The order created to open the position.positionId
(long positionId) An identifier that uniquely identifies the position.rules
(PositionRulesDTO rules) Position rules.strategy
(StrategyDTO strategy) The strategy that created the position.toString()
type
(PositionTypeDTO type) Position type (Long or Short).uid
(long uid) Technical ID.
-
Method Details
-
uid
Technical ID.- Returns:
this
.
-
positionId
An identifier that uniquely identifies the position.- Returns:
this
.
-
type
Position type (Long or Short).- Returns:
this
.
-
strategy
The strategy that created the position.- Returns:
this
.
-
currencyPair
Currency pair.- Returns:
this
.
-
amount
Position amount.- Returns:
this
.
-
rules
Position rules.- Returns:
this
.
-
autoClose
Indicates if the position should be closed automatically by Cassandre.- Returns:
this
.
-
forceClosing
Indicates that the position must be closed no matter the rules.- Returns:
this
.
-
openingOrder
The order created to open the position.- Returns:
this
.
-
closingOrder
The order created to close the position.- Returns:
this
.
-
lowestGainPrice
Price of the lowest gain reached by this position.- Returns:
this
.
-
highestGainPrice
Price of the highest gain reached by this position.- Returns:
this
.
-
latestGainPrice
Price of the latest gain price for this position.- Returns:
this
.
-
build
-
toString
-