Record Class MT4AccountOrderDTO

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.account.mt4.MT4AccountOrderDTO
Record Components:
ticket - order id
openTime - open time
type - order type
lots - order size
symbol - symbol/equity
openPrice - open price
stopLoss - stop loss
takeProfit - take profit
closeTime - close time
closePrice - close price
netProfit - profit/loss
comment - order description
strategyReferenceCode - 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

    Constructors
    Constructor
    Description
    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)
    Creates an instance of a MT4AccountOrderDTO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @PositiveOrZero @DecimalMax("999999999") double
    Returns the value of the closePrice record component.
    @Size(max=255) String
    Returns the value of the closeTime record component.
    Returns the value of the comment record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull @Positive @DecimalMax("999999999") Double
    Returns the value of the lots record component.
    @DecimalMin("-999999999") @DecimalMax("999999999") double
    Returns the value of the netProfit record component.
    @NotNull @PositiveOrZero @DecimalMax("999999999") Double
    Returns the value of the openPrice record component.
    @NotBlank @Size(max=255) String
    Returns the value of the openTime record component.
    @PositiveOrZero @DecimalMax("999999999") double
    Returns the value of the stopLoss record component.
    @Size(max=255) String
    Returns the value of the strategyReferenceCode record component.
    @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) String
    Returns the value of the symbol record component.
    @PositiveOrZero @DecimalMax("999999999") double
    Returns the value of the takeProfit record component.
    @NotBlank @Size(max=255) String
    Returns the value of the ticket record component.
    final String
    Returns a string representation of this record class.
    @NotBlank @Size(max=255) String
    Returns the value of the type record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a MT4AccountOrderDTO record class.
      Parameters:
      ticket - the value for the ticket record component
      openTime - the value for the openTime record component
      type - the value for the type record component
      lots - the value for the lots record component
      symbol - the value for the symbol record component
      openPrice - the value for the openPrice record component
      stopLoss - the value for the stopLoss record component
      takeProfit - the value for the takeProfit record component
      closeTime - the value for the closeTime record component
      closePrice - the value for the closePrice record component
      netProfit - the value for the netProfit record component
      comment - the value for the comment record component
      strategyReferenceCode - the value for the strategyReferenceCode record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ticket

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String ticket()
      Returns the value of the ticket record component.
      Returns:
      the value of the ticket record component
    • openTime

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String openTime()
      Returns the value of the openTime record component.
      Returns:
      the value of the openTime record component
    • type

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • lots

      @NotNull @Positive @DecimalMax("999999999") public @NotNull @Positive @DecimalMax("999999999") Double lots()
      Returns the value of the lots record component.
      Returns:
      the value of the lots record component
    • symbol

      @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) public @NotBlank(groups=MT4PositionOrderValidation.class) @Size(max=255) String symbol()
      Returns the value of the symbol record component.
      Returns:
      the value of the symbol record component
    • openPrice

      @NotNull @PositiveOrZero @DecimalMax("999999999") public @NotNull @PositiveOrZero @DecimalMax("999999999") Double openPrice()
      Returns the value of the openPrice record component.
      Returns:
      the value of the openPrice record component
    • stopLoss

      @PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double stopLoss()
      Returns the value of the stopLoss record component.
      Returns:
      the value of the stopLoss record component
    • takeProfit

      @PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double takeProfit()
      Returns the value of the takeProfit record component.
      Returns:
      the value of the takeProfit record component
    • closeTime

      @Size(max=255) public @Size(max=255) String closeTime()
      Returns the value of the closeTime record component.
      Returns:
      the value of the closeTime record component
    • closePrice

      @PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double closePrice()
      Returns the value of the closePrice record component.
      Returns:
      the value of the closePrice record component
    • netProfit

      @DecimalMin("-999999999") @DecimalMax("999999999") public @DecimalMin("-999999999") @DecimalMax("999999999") double netProfit()
      Returns the value of the netProfit record component.
      Returns:
      the value of the netProfit record component
    • comment

      public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component
    • strategyReferenceCode

      @Size(max=255) public @Size(max=255) String strategyReferenceCode()
      Returns the value of the strategyReferenceCode record component.
      Returns:
      the value of the strategyReferenceCode record component