Class PositionRulesDTO
java.lang.Object
tech.cassandre.trading.bot.dto.position.PositionRulesDTO
Position rules for
PositionDTO
.
This class is used to tell cassandre on which rules it should close a position.
Supported rules:
- Stop gain in percentage.
- Stop loss in percentage.-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
PositionRulesDTO
(PositionRulesDTO.Builder builder) Builder constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic PositionRulesDTO.Builder
builder()
Returns builder.final boolean
Stop gain percentage.Stop loss percentage.final int
hashCode()
boolean
Stop gain percentage has been set.boolean
Stop loss percentage has been set.final String
toString()
-
Constructor Details
-
PositionRulesDTO
Builder constructor.- Parameters:
builder
- Builder.
-
-
Method Details
-
builder
Returns builder.- Returns:
- builder
-
equals
-
hashCode
public final int hashCode() -
toString
-
isStopGainPercentageSet
public boolean isStopGainPercentageSet()Stop gain percentage has been set. -
getStopGainPercentage
Stop gain percentage. -
isStopLossPercentageSet
public boolean isStopLossPercentageSet()Stop loss percentage has been set. -
getStopLossPercentage
Stop loss percentage.
-