Class OCOStrategy
java.lang.Object
com.caplin.motif.UserTrade
com.caplin.motif.fx.trading.orders.submission.strategy.MotifOrderStrategy
com.caplin.motif.fx.trading.orders.submission.strategy.OCOStrategy
- All Implemented Interfaces:
OrderStrategy
Deprecated.
Represents the contingent order strategy One Cancels the Other.
The structure of this order is defined as:
- Stop Loss
- Take Profit
-
Field Summary
Fields inherited from class com.caplin.motif.fx.trading.orders.submission.strategy.MotifOrderStrategy
orders
-
Constructor Summary
ConstructorDescriptionOCOStrategy
(com.caplin.trading.Trade trade, String tradingSubProtocol, String currencyPair, String user, String toboUser, String remarks, Set<AlertType> alertTypes, String requestId, String account, List<Order> orders, ActivationDate activationDate, ExpirationDate expirationDate) Deprecated.Creates a new OCOStrategy from the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the stop loss child order from within the OCO.Deprecated.Returns the take profit child order from within the OCO.Methods inherited from class com.caplin.motif.fx.trading.orders.submission.strategy.MotifOrderStrategy
getAccount, getActivationDate, getAlertTypes, getChildOrders, getCurrencyPair, getExpirationDate, getPendingAcceptResponder, getQueuedResponder, getRemarks, getSpotRateDPS, getSubmittedResponder, getTOBOUser, getTradingSubProtocol, getType, toString
Methods inherited from class com.caplin.motif.UserTrade
getBackingTrade, getExecutorService, getRequestID, getUsername
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.caplin.motif.fx.trading.orders.submission.OrderStrategy
getRequestID, getUsername
-
Constructor Details
-
OCOStrategy
public OCOStrategy(com.caplin.trading.Trade trade, String tradingSubProtocol, String currencyPair, String user, String toboUser, String remarks, Set<AlertType> alertTypes, String requestId, String account, List<Order> orders, ActivationDate activationDate, ExpirationDate expirationDate) Deprecated.Creates a new OCOStrategy from the provided parameters.- Parameters:
trade
- The underlying Trading DataSource trade object containing the raw field map that this strategy will be built from.tradingSubProtocol
- The trading sub protocol, used to determine small variations of OrderStrategy.currencyPair
- The currency pair for the strategy. All child orders in an OCO strategy are expected to relate to the same currency pair.user
- The user who submitted the strategy.toboUser
- The trade on behalf of user.remarks
- The contents of the free text remarks field for the strategy, for example "Call this number when the order fills".alertTypes
- A set ofAlertType
s that should be used when the order fills, for example SMS or email.requestId
- The client-generated ID for the strategy.account
- The account that the strategy relates to.orders
- A list of child orders that make up the strategy. The ordering in the list is important. The first child order in the list must be the stop loss order, and the second order in the list must be the take profit order; otherwise thegetStopLossOrder()
andgetTakeProfitOrder()
methods will not work correctly. There should never be more or less than two orders in the list.activationDate
- The date on which this strategy should become active in the market.expirationDate
- The date on which this strategy should expire.
-
-
Method Details
-
getTakeProfitOrder
Deprecated.Returns the take profit child order from within the OCO.- Returns:
- The take profit order.
-
getStopLossOrder
Deprecated.Returns the stop loss child order from within the OCO.- Returns:
- The stop loss order.
-