Class PositionRulesDTO
- java.lang.Object
-
- tech.cassandre.trading.bot.dto.position.PositionRulesDTO
-
public class PositionRulesDTO extends Object
Position rules forPositionDTO
. It is used to know if cassandre should close a position. Supported rules : - Stop gain with percentage. - Stop loss with percentage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PositionRulesDTO.Builder
Builder.
-
Constructor Summary
Constructors Modifier Constructor Description protected
PositionRulesDTO(PositionRulesDTO.Builder builder)
Builder constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PositionRulesDTO.Builder
builder()
Returns builder.boolean
equals(Object o)
Float
getStopGainPercentage()
Stop gain percentage.Float
getStopLossPercentage()
Stop loss percentage.int
hashCode()
boolean
isStopGainPercentageSet()
Stop gain percentage has been set.boolean
isStopLossPercentageSet()
Stop loss percentage has been set.String
toString()
-
-
-
Constructor Detail
-
PositionRulesDTO
protected PositionRulesDTO(PositionRulesDTO.Builder builder)
Builder constructor.- Parameters:
builder
- Builder.
-
-
Method Detail
-
builder
public static PositionRulesDTO.Builder builder()
Returns builder.- Returns:
- builder
-
isStopGainPercentageSet
public boolean isStopGainPercentageSet()
Stop gain percentage has been set.
-
getStopGainPercentage
public Float getStopGainPercentage()
Stop gain percentage.
-
isStopLossPercentageSet
public boolean isStopLossPercentageSet()
Stop loss percentage has been set.
-
getStopLossPercentage
public Float getStopLossPercentage()
Stop loss percentage.
-
-