Class IfDoneStrategy

  • All Implemented Interfaces:
    OrderStrategy

    @Deprecated
    public class IfDoneStrategy
    extends MotifOrderStrategy
    Deprecated.

    Represents the contingent order strategy If Done then One Cancels the Other.

    The structure of this order is defined as:
    • Parent Order
      • Child Order
    • Constructor Detail

      • IfDoneStrategy

        public IfDoneStrategy​(com.caplin.trading.Trade trade,
                              java.lang.String tradingSubProtocol,
                              java.lang.String currencyPair,
                              java.lang.String user,
                              java.lang.String toboUser,
                              java.lang.String remarks,
                              java.util.Set<AlertType> alertTypes,
                              java.lang.String requestId,
                              java.lang.String account,
                              java.util.List<Order> orders,
                              ActivationDate activationDate,
                              ExpirationDate expirationDate)
        Deprecated.
        Constructs an IfDoneStrategy based on the parameters provided.
        Parameters:
        trade - The Trade object from the underlying Trading DataSource library. This contains the field map which the SingleStrategy is built from.
        tradingSubProtocol - The trading sub protocol, used to determine small variations of OrderStrategy.
        currencyPair - The currency pair that the order relates to.
        user - The user who submitted the order.
        toboUser - The trade on behalf of user.
        remarks - he contents of the free-form text field that can be filled in when submitting the order.
        alertTypes - A set of AlertTypes that should be used when the order is filled, such as SMS or email.
        requestId - The client-generated unique identifier for the order.
        account - The account that the order relates to.
        orders - The list of orders that make up this strategy.
        activationDate - The date and time that this order should be activated on.
        expirationDate - The date and time that this order should expire.
    • Method Detail

      • getParentOrder

        public Order getParentOrder()
        Deprecated.
        Returns the parent order, which must be of type Take Profit, Stop Loss or Market.
        Returns:
        The parent order.
      • getThenOrder

        public Order getThenOrder()
        Deprecated.
        Returns the order which will be executed once the parent has been executed. This order can be of type Take Profit or Stop Loss.
        Returns:
        The child order.