Record Class MT4AccountOrderDTO
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.account.mt4.MT4AccountOrderDTO
- Record Components:
ticket- order idopenTime- open timetype- order typelots- order sizesymbol- symbol/equityopenPrice- open pricestopLoss- stop losstakeProfit- take profitcloseTime- close timeclosePrice- close pricenetProfit- profit/losscomment- order descriptionstrategyReferenceCode- optional assigned strategy reference code
public record MT4AccountOrderDTO(@NotBlank @Size(max=255) String ticket, @NotBlank @Size(max=255) String openTime, @NotBlank @Size(max=255) String type, @NotNull @Positive @DecimalMax("999999999") Double lots, @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) String symbol, @NotNull @PositiveOrZero @DecimalMax("999999999") Double openPrice, @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") double takeProfit, @Size(max=255) String closeTime, @PositiveOrZero @DecimalMax("999999999") double closePrice, @DecimalMin("-999999999") @DecimalMax("999999999") double netProfit, String comment, @Size(max=255) String strategyReferenceCode)
extends Record
Request object representing a trade/transaction from MT4.
- Version:
- 3.0.1
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionMT4AccountOrderDTO(@NotBlank @Size(max=255) String ticket, @NotBlank @Size(max=255) String openTime, @NotBlank @Size(max=255) String type, @NotNull @Positive @DecimalMax("999999999") Double lots, @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) String symbol, @NotNull @PositiveOrZero @DecimalMax("999999999") Double openPrice, @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") double takeProfit, @Size(max=255) String closeTime, @PositiveOrZero @DecimalMax("999999999") double closePrice, @DecimalMin("-999999999") @DecimalMax("999999999") double netProfit, String comment, @Size(max=255) String strategyReferenceCode) Creates an instance of aMT4AccountOrderDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@PositiveOrZero @DecimalMax("999999999") doubleReturns the value of theclosePricerecord component.@Size(max=255) StringReturns the value of thecloseTimerecord component.comment()Returns the value of thecommentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull @Positive @DecimalMax("999999999") Doublelots()Returns the value of thelotsrecord component.@DecimalMin("-999999999") @DecimalMax("999999999") doubleReturns the value of thenetProfitrecord component.@NotNull @PositiveOrZero @DecimalMax("999999999") DoubleReturns the value of theopenPricerecord component.@NotBlank @Size(max=255) StringopenTime()Returns the value of theopenTimerecord component.@PositiveOrZero @DecimalMax("999999999") doublestopLoss()Returns the value of thestopLossrecord component.@Size(max=255) StringReturns the value of thestrategyReferenceCoderecord component.@NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) Stringsymbol()Returns the value of thesymbolrecord component.@PositiveOrZero @DecimalMax("999999999") doubleReturns the value of thetakeProfitrecord component.@NotBlank @Size(max=255) Stringticket()Returns the value of theticketrecord component.final StringtoString()Returns a string representation of this record class.@NotBlank @Size(max=255) Stringtype()Returns the value of thetyperecord component.
-
Constructor Details
-
MT4AccountOrderDTO
public MT4AccountOrderDTO(@NotBlank @Size(max=255) @NotBlank @Size(max=255) String ticket, @NotBlank @Size(max=255) @NotBlank @Size(max=255) String openTime, @NotBlank @Size(max=255) @NotBlank @Size(max=255) String type, @NotNull @Positive @DecimalMax("999999999") @NotNull @Positive @DecimalMax("999999999") Double lots, @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) String symbol, @NotNull @PositiveOrZero @DecimalMax("999999999") @NotNull @PositiveOrZero @DecimalMax("999999999") Double openPrice, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") double takeProfit, @Size(max=255) @Size(max=255) String closeTime, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") double closePrice, @DecimalMin("-999999999") @DecimalMax("999999999") @DecimalMin("-999999999") @DecimalMax("999999999") double netProfit, String comment, @Size(max=255) @Size(max=255) String strategyReferenceCode) Creates an instance of aMT4AccountOrderDTOrecord class.- Parameters:
ticket- the value for theticketrecord componentopenTime- the value for theopenTimerecord componenttype- the value for thetyperecord componentlots- the value for thelotsrecord componentsymbol- the value for thesymbolrecord componentopenPrice- the value for theopenPricerecord componentstopLoss- the value for thestopLossrecord componenttakeProfit- the value for thetakeProfitrecord componentcloseTime- the value for thecloseTimerecord componentclosePrice- the value for theclosePricerecord componentnetProfit- the value for thenetProfitrecord componentcomment- the value for thecommentrecord componentstrategyReferenceCode- the value for thestrategyReferenceCoderecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
ticket
-
openTime
-
type
-
lots
-
symbol
@NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) public @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) String symbol()Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
openPrice
-
stopLoss
-
takeProfit
@PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double takeProfit()Returns the value of thetakeProfitrecord component.- Returns:
- the value of the
takeProfitrecord component
-
closeTime
-
closePrice
@PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double closePrice()Returns the value of theclosePricerecord component.- Returns:
- the value of the
closePricerecord component
-
netProfit
-
comment
-
strategyReferenceCode
Returns the value of thestrategyReferenceCoderecord component.- Returns:
- the value of the
strategyReferenceCoderecord component
-