@Deprecated public class DefaultIfDoneOCOValidator extends Object implements OrderSubmissionValidator
The default implementation of OrderSubmissionValidator for IfDoneOCO submissions.
Checks that the first leg is either STOP-LOSS, TAKE-PROFIT or MARKET
Checks that the second leg is TAKE-PROFIT and the third leg is STOP-LOSS
|Constructor and Description|
Constructs the default validator for IF-DONE-OCO orders.
|Modifier and Type||Method and Description|
Checks the validity of a strategy based on its type, the strategy object itself, and the raw field map that the strategy was derived from.
public void validate(StrategyType type, OrderStrategy strategy, Map<String,String> fields) throws OrderConfigurationException
OrderConfigurationExceptionif the strategy is not valid.
type- The StrategyType of the order.
strategy- The OrderStrategy object that represents the strategy.
fields- The raw field map that was used to create the
OrderConfigurationException- If the legs are not valid for this strategy.
Copyright © 2019 Caplin Systems.