public class IfDoneStrategy extends MotifOrderStrategy
Represents the contingent order strategy If Done then One Cancels the Other.
The structure of this order is defined as:orders
trade
Constructor and Description |
---|
IfDoneStrategy(com.caplin.trading.Trade trade,
TradingSubProtocol tradingSubProtocol,
String currencyPair,
String user,
String toboUser,
String remarks,
Set<AlertType> alertTypes,
String requestId,
String account,
List<Order> orders,
ActivationDate activationDate,
ExpirationDate expirationDate)
Constructs an IfDoneStrategy based on the parameters provided.
|
Modifier and Type | Method and Description |
---|---|
Order |
getParentOrder()
Returns the parent order, which must be of type Take Profit, Stop Loss or Market.
|
Order |
getThenOrder()
Returns the order which will be executed once the parent has been executed.
|
getAccount, getActivationDate, getAlertTypes, getChildOrders, getCurrencyPair, getExpirationDate, getPendingAcceptResponder, getQueuedResponder, getRemarks, getSpotRateDPS, getSubmittedResponder, getTOBOUser, getTradingSubProtocol, getType, toString
createEvent, getCurrentState, getField, getRequestID, getTradeChannelSubject, getUsername, sendEvent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRequestID, getUsername
public IfDoneStrategy(com.caplin.trading.Trade trade, TradingSubProtocol tradingSubProtocol, String currencyPair, String user, String toboUser, String remarks, Set<AlertType> alertTypes, String requestId, String account, List<Order> orders, ActivationDate activationDate, ExpirationDate expirationDate)
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 AlertType
s 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.public Order getParentOrder()
public Order getThenOrder()
Copyright © 2015 Caplin Systems.